mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +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
1 changed files with 1 additions and 1 deletions
|
@ -1017,7 +1017,7 @@ static HRESULT WINAPI filestream_CopyTo(IStream *iface, IStream *dest, ULARGE_IN
|
|||
|
||||
/* Write */
|
||||
hr = IStream_Write(dest, buff, read_chunk, &written_chunk);
|
||||
if (written_chunk)
|
||||
if (written)
|
||||
written->QuadPart += written_chunk;
|
||||
if (FAILED(hr) || written_chunk != left)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue