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

Alexandre Julliard julliard at winehq.org
Fri Sep 13 10:15:50 CDT 2013


Module: wine
Branch: master
Commit: eb10471bac5510ab5a265069c472e9085e721191
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eb10471bac5510ab5a265069c472e9085e721191

Author: Dmitry Timoshkov <dmitry at 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;




More information about the wine-cvs mailing list