Thread (1 message) 1 message, 1 author, 2018-05-27

Re: [PATCH] packfile: Correct zlib buffer handling

From: Junio C Hamano <hidden>
Date: 2018-05-27 11:53:42

Duy Nguyen [off-list ref] writes:
On Sun, May 27, 2018 at 1:57 AM, Junio C Hamano [off-list ref] wrote:
quoted
Duy Nguyen [off-list ref] writes:
quoted
On Sat, May 26, 2018 at 12:56 AM, Jeremy Linton [off-list ref] wrote:
quoted
@@ -1416,7 +1416,7 @@ static void *unpack_compressed_entry(struct packed_git *p,
                return NULL;
        memset(&stream, 0, sizeof(stream));
        stream.next_out = buffer;
-       stream.avail_out = size + 1;
+       stream.avail_out = size;
You may want to include in your commit message a reference to
39eea7bdd9 (Fix incorrect error check while reading deflated pack data
- 2009-10-21) which adds this plus one with a fascinating story
behind.
A bit puzzled---are you saying that this recent patch breaks the old
fix and must be done in some other way?
No. I actually wanted to answer that question when I tried to track
down the commit that adds " + 1" but I did not spend enough time to
understand the old problem. I guess your puzzle means you didn't think
it would break anything, which is good.
No it merely means I am puzzled how the posted patch that goes
directly opposite to what an earlier "fix" did is a correct solution
to anything X-<.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help