mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-27 23:12:52 +00:00
Fix uninitialized memory in winhttp subtransport on 64-bit
This commit is contained in:
parent
2364735c8f
commit
2f683f0097
@ -278,6 +278,7 @@ static int winhttp_stream_read(
|
||||
{
|
||||
winhttp_stream *s = (winhttp_stream *)stream;
|
||||
winhttp_subtransport *t = OWNING_SUBTRANSPORT(s);
|
||||
DWORD dw_bytes_read;
|
||||
|
||||
replay:
|
||||
/* Connect if necessary */
|
||||
@ -376,12 +377,14 @@ replay:
|
||||
if (!WinHttpReadData(s->request,
|
||||
(LPVOID)buffer,
|
||||
buf_size,
|
||||
(LPDWORD)bytes_read))
|
||||
&dw_bytes_read))
|
||||
{
|
||||
giterr_set(GITERR_OS, "Failed to read data");
|
||||
return -1;
|
||||
}
|
||||
|
||||
*bytes_read = dw_bytes_read;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user