PATCH: NtWriteFile
Marcus Meissner
meissner at suse.de
Fri Jan 9 09:21:09 CST 2004
Hi,
This fixes a crash when WriteFile()ing to a file descriptor which
needs an OVERLAPPED parameter.
The behaviour is merely undefined according to MSDN, it should not crash.
It also mirrors same code in NtReadFile.
It should also fix bug #1874.
Ciao, Marcus
Changelog:
Allow offset of NULL to NtWriteFile.
Index: dlls/ntdll/file.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/file.c,v
retrieving revision 1.35
diff -u -r1.35 file.c
--- dlls/ntdll/file.c 1 Dec 2003 23:01:13 -0000 1.35
+++ dlls/ntdll/file.c 9 Jan 2004 15:17:10 -0000
@@ -558,8 +558,10 @@
ovp->async.event = hEvent;
ovp->async.iosb = io_status;
ovp->count = length;
- ovp->offset = offset->s.LowPart;
- if (offset->s.HighPart) FIXME("NIY-high part\n");
+ if (offset) {
+ ovp->offset = offset->s.LowPart;
+ if (offset->s.HighPart) FIXME("NIY-high part\n");
+ }
ovp->apc = apc;
ovp->apc_user = apc_user;
ovp->buffer = (void*)buffer;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20040109/61649e64/attachment.pgp
More information about the wine-patches
mailing list