some case from win32k can call to RtlClearAllBits with NULL pointer. and check for null pointer after RtlClearAllBits. This take care of those case for moment.

svn path=/trunk/; revision=20421
This commit is contained in:
Magnus Olsen
2005-12-29 13:43:25 +00:00
parent 181c0f4e30
commit e35bf0429c
+9 -3
View File
@@ -125,9 +125,15 @@ RtlAreBitsSet(PRTL_BITMAP BitMapHeader,
VOID NTAPI
RtlClearAllBits(IN OUT PRTL_BITMAP BitMapHeader)
{
memset(BitMapHeader->Buffer,
0x00,
ROUND_UP(BitMapHeader->SizeOfBitMap, 8) / 8);
if (BitMapHeader != NULL)
{
if (BitMapHeader->Buffer != NULL)
{
memset(BitMapHeader->Buffer,
0x00,
ROUND_UP(BitMapHeader->SizeOfBitMap, 8) / 8);
}
}
}