Re: [2/6] ntdll: Add support to NtWriteFile for special offset -1.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
--- dlls/ntdll/file.c | 3 +++ dlls/ntdll/tests/file.c | 15 --------------- 2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 9420df5..9d5b02a 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -967,6 +967,9 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, goto done; }
+ if (offset && offset->QuadPart == (LONGLONG)-1 /* FILE_WRITE_TO_END_OF_FILE */) + offset->QuadPart = lseek( unix_handle, 0, SEEK_END ); +
This looks very wrong, offset belongs to the caller. -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard <julliard(a)winehq.org> wrote:
+ if (offset && offset->QuadPart == (LONGLONG)-1 /* FILE_WRITE_TO_END_OF_FILE */) + offset->QuadPart = lseek( unix_handle, 0, SEEK_END ); +
This looks very wrong, offset belongs to the caller.
Of course you are correct, thanks. -- Dmitry.
participants (2)
-
Alexandre Julliard -
Dmitry Timoshkov