git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] packfile: Correct zlib buffer handling

From
Junio C Hamano <gitster@pobox.com>
Date
May 27, 2018, 11:53 UTC
Message-ID
<xmqqsh6dl3gg.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CACsJy8CNmDkxzhkdfwjVHjGF4JeUzzPHGnp1x647NxU-GxkxvA@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 23 quoted lines
> On Sun, May 27, 2018 at 1:57 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Duy Nguyen <pclouds@gmail.com> writes:
>>
>>> On Sat, May 26, 2018 at 12:56 AM, Jeremy Linton <lintonrjeremy@gmail.com> wrote:
>>>> @@ -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-<.

Previous: Duy NguyenNext: Junio C Hamano
Message 5 of 7 in “packfile: Correct zlib buffer handling”
  1. packfile: Correct zlib buffer handlingJeremy Linton, May 25, 2018
  2. Duy NguyenMay 26, 2018
  3. Junio C HamanoMay 26, 2018
  4. Duy NguyenMay 27, 2018
  5. Junio C HamanoMay 27, 2018
  6. Junio C HamanoMay 28, 2018
  7. Jeremy LintonJun 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.