mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-29 05:19:57 +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_stream *s = (winhttp_stream *)stream;
|
||||||
winhttp_subtransport *t = OWNING_SUBTRANSPORT(s);
|
winhttp_subtransport *t = OWNING_SUBTRANSPORT(s);
|
||||||
|
DWORD dw_bytes_read;
|
||||||
|
|
||||||
replay:
|
replay:
|
||||||
/* Connect if necessary */
|
/* Connect if necessary */
|
||||||
@ -376,12 +377,14 @@ replay:
|
|||||||
if (!WinHttpReadData(s->request,
|
if (!WinHttpReadData(s->request,
|
||||||
(LPVOID)buffer,
|
(LPVOID)buffer,
|
||||||
buf_size,
|
buf_size,
|
||||||
(LPDWORD)bytes_read))
|
&dw_bytes_read))
|
||||||
{
|
{
|
||||||
giterr_set(GITERR_OS, "Failed to read data");
|
giterr_set(GITERR_OS, "Failed to read data");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*bytes_read = dw_bytes_read;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user