mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
urlmon: Fix call to ReadFile.
The BytesRead parameter passed to ReadFile may never be NULL.
This commit is contained in:
parent
648cc6f435
commit
38bfd5e635
@ -225,6 +225,7 @@ static HRESULT WINAPI IStream_fnRead (IStream * iface,
|
||||
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 @@ static HRESULT WINAPI IStream_fnRead (IStream * iface,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user