summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2012-11-08 20:26:54 -0500
committerPhilip Kelley <phkelley@hotmail.com>2012-11-08 20:26:54 -0500
commit5fd944b35471f757ae11619345e0ee7405b3ae17 (patch)
tree97abce6127b4d2a68e3e2682de42c0b345b8264f
parentc816dbd5bdb896380bef24069bd6d1a105b6758b (diff)
downloadlibgit2-5fd944b35471f757ae11619345e0ee7405b3ae17.tar.gz
Fix uninitialized high dword of 8-byte size_t
-rw-r--r--src/transports/winhttp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index ac5ba301e..886205807 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -334,6 +334,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 */
@@ -494,12 +495,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;
}