mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +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
|
@ -93,12 +93,6 @@ BasepMoveFileDelayed(IN PUNICODE_STRING ExistingPath,
|
|||
|
||||
/* Reserve enough to read previous string + to append our with required null chars */
|
||||
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)
|
||||
{
|
||||
|
@ -123,6 +117,7 @@ BasepMoveFileDelayed(IN PUNICODE_STRING ExistingPath,
|
|||
StringLength = DataSize;
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
|
||||
BufferLength = ExistingPath->Length + StringLength + NewPath->Length + 3 * sizeof(UNICODE_NULL);
|
||||
/* Check we didn't overflow */
|
||||
if (BufferLength < StringLength)
|
||||
{
|
||||
NtClose(KeyHandle);
|
||||
|
|
Loading…
Reference in a new issue