Ivan Semenoff <ivans77@mail.ru>

Fixed a bug in RtlClearBits (asserting if startingindex+count is more than size, instead of silently continuing processing).

svn path=/trunk/; revision=14140
This commit is contained in:
Aleksey Bragin 2005-03-16 19:27:45 +00:00
parent 4d47498931
commit 31046fef6e

View file

@ -187,8 +187,7 @@ RtlClearBits(PRTL_BITMAP BitMapHeader,
if (StartingIndex >= Size || NumberToClear == 0)
return;
if (StartingIndex + NumberToClear > Size)
NumberToClear = Size - StartingIndex;
ASSERT(StartingIndex + NumberToClear <= Size);
Ptr = (PULONG)BitMapHeader->Buffer + (StartingIndex / 32);
while (NumberToClear)