[ros-diffs] [greatlrd] 20421: 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.
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Thu Dec 29 15:50:09 CET 2005
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.
Modified: trunk/reactos/lib/rtl/bitmap.c
_____
Modified: trunk/reactos/lib/rtl/bitmap.c
--- trunk/reactos/lib/rtl/bitmap.c 2005-12-29 13:13:14 UTC (rev
20420)
+++ trunk/reactos/lib/rtl/bitmap.c 2005-12-29 13:43:25 UTC (rev
20421)
@@ -125,9 +125,15 @@
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);
+ }
+ }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051229/8f22da76/attachment.html
More information about the Ros-diffs
mailing list