URLMON: fix call to ReadFile
Thomas Weidenmueller
wine-patches at reactsoft.com
Thu Dec 8 13:37:18 CST 2005
The last two parameters passed to ReadFile may never be NULL.
-------------- next part --------------
Index: dlls/urlmon/umstream.c
===================================================================
RCS file: /home/wine/wine/dlls/urlmon/umstream.c,v
retrieving revision 1.2
diff -u -r1.2 umstream.c
--- dlls/urlmon/umstream.c 3 Jul 2005 12:05:03 -0000 1.2
+++ dlls/urlmon/umstream.c 8 Dec 2005 19:19:02 -0000
@@ -225,6 +225,7 @@
ULONG cb,
ULONG* pcbRead)
{
+ DWORD dwBytesRead;
IUMCacheStream *This = (IUMCacheStream *)iface;
TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead);
@@ -232,7 +233,7 @@
if ( !pv )
return STG_E_INVALIDPOINTER;
- if ( ! ReadFile( This->handle, pv, cb, pcbRead, NULL ) )
+ if ( ! ReadFile( This->handle, pv, cb, (pcbRead ? pcbRead : &dwBytesRead), NULL ) )
return S_FALSE;
if (!*pcbRead)
More information about the wine-patches
mailing list