Module: wine Branch: master Commit: eb10471bac5510ab5a265069c472e9085e721191 URL: http://source.winehq.org/git/wine.git/?a=commit;h=eb10471bac5510ab5a265069c4... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Sep 13 15:45:53 2013 +0900 ntdll: NtReadFile should fail for overlapped IO on files if offset is negative. --- dlls/ntdll/file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 2d07255..15e8829 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -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;