[PATCH 0/1] MR5698: 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'. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5698
From: Danyil Blyschak <dblyschak(a)codeweavers.com> Check that the 'written' parameter in this function is non-null before incrementing it by 'written_chunk'. --- dlls/shcore/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index a64b6661d23..58ddda3fb2a 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -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; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5698
participants (2)
-
Danyil Blyschak -
Danyil Blyschak (@blyss)