[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:
Pierre Schweitzer 2015-02-19 19:15:46 +00:00
parent d0b90bd6bf
commit a4da8ab741

View file

@ -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);