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;
Attachment:
pgp00211.pgp
Description: PGP signature