mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:31:39 +00:00
shcore: Check optional pointer in filestream_CopyTo() before writing to it.
Check that the 'written' parameter in this function is non-null before incrementing it by 'written_chunk'.
This commit is contained in:
parent
3ee6f3b918
commit
d28d7bd52c
|
@ -1017,7 +1017,7 @@ static HRESULT WINAPI filestream_CopyTo(IStream *iface, IStream *dest, ULARGE_IN
|
||||||
|
|
||||||
/* Write */
|
/* Write */
|
||||||
hr = IStream_Write(dest, buff, read_chunk, &written_chunk);
|
hr = IStream_Write(dest, buff, read_chunk, &written_chunk);
|
||||||
if (written_chunk)
|
if (written)
|
||||||
written->QuadPart += written_chunk;
|
written->QuadPart += written_chunk;
|
||||||
if (FAILED(hr) || written_chunk != left)
|
if (FAILED(hr) || written_chunk != left)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue