[PATCH 4/5] Correctly initialize buffer in start_put() in http-push.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brown paper bag fix to avoid random misbehaviour.

Signed-off-by: Mike Hommey <mh@xxxxxxxxxxxx>
---

 This is a brown paper bag fix for my strbuf patch for the http code.

 http-push.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/http-push.c b/http-push.c
index 2ef764c..ad8167e 100644
--- a/http-push.c
+++ b/http-push.c
@@ -495,6 +495,7 @@ static void start_put(struct transfer_request *request)
 	deflateInit(&stream, zlib_compression_level);
 	size = deflateBound(&stream, len + hdrlen);
 	strbuf_init(&request->buffer.buf, size);
+	request->buffer.posn = 0;
 
 	/* Compress it */
 	stream.next_out = (unsigned char *)request->buffer.buf.buf;
-- 
1.5.3.7.1159.gdd4a4


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux