mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 13:01:40 +00:00
[RTL]
Add missing parameter checks to RtlAreBitsClear and RtlAreBitsSet svn path=/trunk/; revision=55575
This commit is contained in:
parent
6c35ffefb5
commit
7a0cab18d0
1 changed files with 10 additions and 0 deletions
|
@ -365,6 +365,11 @@ RtlAreBitsClear(
|
||||||
IN ULONG StartingIndex,
|
IN ULONG StartingIndex,
|
||||||
IN ULONG Length)
|
IN ULONG Length)
|
||||||
{
|
{
|
||||||
|
/* Verify parameters */
|
||||||
|
if ((StartingIndex + Length > BitMapHeader->SizeOfBitMap) ||
|
||||||
|
(StartingIndex + Length <= StartingIndex))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return RtlpGetLengthOfRunClear(BitMapHeader, StartingIndex, Length) >= Length;
|
return RtlpGetLengthOfRunClear(BitMapHeader, StartingIndex, Length) >= Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,6 +380,11 @@ RtlAreBitsSet(
|
||||||
IN ULONG StartingIndex,
|
IN ULONG StartingIndex,
|
||||||
IN ULONG Length)
|
IN ULONG Length)
|
||||||
{
|
{
|
||||||
|
/* Verify parameters */
|
||||||
|
if ((StartingIndex + Length > BitMapHeader->SizeOfBitMap) ||
|
||||||
|
(StartingIndex + Length <= StartingIndex))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return RtlpGetLengthOfRunSet(BitMapHeader, StartingIndex, Length) >= Length;
|
return RtlpGetLengthOfRunSet(BitMapHeader, StartingIndex, Length) >= Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue