mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[RTL]
Add missing parameter checks to RtlAreBitsClear and RtlAreBitsSet svn path=/trunk/; revision=55575
This commit is contained in:
@@ -365,6 +365,11 @@ RtlAreBitsClear(
|
||||
IN ULONG StartingIndex,
|
||||
IN ULONG Length)
|
||||
{
|
||||
/* Verify parameters */
|
||||
if ((StartingIndex + Length > BitMapHeader->SizeOfBitMap) ||
|
||||
(StartingIndex + Length <= StartingIndex))
|
||||
return FALSE;
|
||||
|
||||
return RtlpGetLengthOfRunClear(BitMapHeader, StartingIndex, Length) >= Length;
|
||||
}
|
||||
|
||||
@@ -375,6 +380,11 @@ RtlAreBitsSet(
|
||||
IN ULONG StartingIndex,
|
||||
IN ULONG Length)
|
||||
{
|
||||
/* Verify parameters */
|
||||
if ((StartingIndex + Length > BitMapHeader->SizeOfBitMap) ||
|
||||
(StartingIndex + Length <= StartingIndex))
|
||||
return FALSE;
|
||||
|
||||
return RtlpGetLengthOfRunSet(BitMapHeader, StartingIndex, Length) >= Length;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user