diff options
author | Philip Kelley <phkelley@hotmail.com> | 2012-11-09 15:39:25 -0500 |
---|---|---|
committer | Philip Kelley <phkelley@hotmail.com> | 2012-11-09 15:39:25 -0500 |
commit | 2f683f00971239007e1d602ec1a71a1eb10f4f5e (patch) | |
tree | 7198274944b1a5aaf25f410799cf7abc6ce2ba62 /src/transports/winhttp.c | |
parent | 2364735c8fc08615fd868244e9e00143c70c0c22 (diff) | |
download | libgit2-2f683f00971239007e1d602ec1a71a1eb10f4f5e.tar.gz |
Fix uninitialized memory in winhttp subtransport on 64-bit
Diffstat (limited to 'src/transports/winhttp.c')
-rw-r--r-- | src/transports/winhttp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c index 44617f389..df6cd87ec 100644 --- a/src/transports/winhttp.c +++ b/src/transports/winhttp.c @@ -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; } |