ntdll: Make NtWriteFile explicitly check for negative offset and fail.
This commit is contained in:
parent
9e50cc540a
commit
b314a25320
|
@ -982,6 +982,11 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
|
|||
}
|
||||
off = st.st_size;
|
||||
}
|
||||
else if (offset->QuadPart < 0)
|
||||
{
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* async I/O doesn't make sense on regular files */
|
||||
while ((result = pwrite( unix_handle, buffer, length, off )) == -1)
|
||||
|
|
Loading…
Reference in New Issue