mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
[KERNEL32]
OK, Thomas had to convince me that MAX_USHORT + MAX_USHORT + 0x400 + 0x6 cannot overflow an ULONG. So remove useless check. By Thomas :-) svn path=/trunk/; revision=66358
This commit is contained in:
parent
d0b90bd6bf
commit
a4da8ab741
1 changed files with 1 additions and 6 deletions
|
@ -93,12 +93,6 @@ BasepMoveFileDelayed(IN PUNICODE_STRING ExistingPath,
|
||||||
|
|
||||||
/* Reserve enough to read previous string + to append our with required null chars */
|
/* Reserve enough to read previous string + to append our with required null chars */
|
||||||
BufferLength = NewPath->Length + ExistingPath->Length + STRING_LENGTH + 3 * sizeof(UNICODE_NULL);
|
BufferLength = NewPath->Length + ExistingPath->Length + STRING_LENGTH + 3 * sizeof(UNICODE_NULL);
|
||||||
/* Check we didn't overflow */
|
|
||||||
if (BufferLength < STRING_LENGTH)
|
|
||||||
{
|
|
||||||
NtClose(KeyHandle);
|
|
||||||
return STATUS_BUFFER_TOO_SMALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -123,6 +117,7 @@ BasepMoveFileDelayed(IN PUNICODE_STRING ExistingPath,
|
||||||
StringLength = DataSize;
|
StringLength = DataSize;
|
||||||
RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
|
RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
|
||||||
BufferLength = ExistingPath->Length + StringLength + NewPath->Length + 3 * sizeof(UNICODE_NULL);
|
BufferLength = ExistingPath->Length + StringLength + NewPath->Length + 3 * sizeof(UNICODE_NULL);
|
||||||
|
/* Check we didn't overflow */
|
||||||
if (BufferLength < StringLength)
|
if (BufferLength < StringLength)
|
||||||
{
|
{
|
||||||
NtClose(KeyHandle);
|
NtClose(KeyHandle);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue