ntdll: NtReadFile should fail for overlapped IO on files if offset is negative.

This commit is contained in:
Dmitry Timoshkov 2013-09-13 15:45:53 +09:00 committed by Alexandre Julliard
parent b314a25320
commit eb10471bac
1 changed files with 1 additions and 1 deletions

View File

@ -606,7 +606,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
if (type == FD_TYPE_FILE)
{
if (!(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT)) && !offset)
if (!(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT)) && (!offset || offset->QuadPart < 0))
{
status = STATUS_INVALID_PARAMETER;
goto done;