Commit 2f683f00 by Philip Kelley

Fix uninitialized memory in winhttp subtransport on 64-bit

parent 2364735c
...@@ -278,6 +278,7 @@ static int winhttp_stream_read( ...@@ -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: ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment