summaryrefslogtreecommitdiff
path: root/ls-refs.c
diff options
context:
space:
mode:
authorLibravatar Jeremy Linton <lintonrjeremy@gmail.com>2018-06-13 09:22:07 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-06-13 11:34:27 -0700
commitb611396e97cba09c7e1cf900190cf1a9e922546e (patch)
tree8bdebcc0ae44968876d6bfa8381508d124213d3e /ls-refs.c
parentGit 2.16.4 (diff)
downloadtgif-b611396e97cba09c7e1cf900190cf1a9e922546e.tar.xz
packfile: correct zlib buffer handling
The buffer being passed to zlib includes a NUL terminator that git needs to keep in place. unpack_compressed_entry() attempts to detect the case that the source buffer hasn't been fully consumed by checking to see if the destination buffer has been over consumed. This causes a problem, that more recent zlib patches have been poisoning the unconsumed portions of the buffer which overwrites the NUL byte, while correctly returning length and status. Let's place the NUL at the end of the buffer after inflate returns to assure that it doesn't result in problems for git even if its been overwritten by zlib. Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ls-refs.c')
0 files changed, 0 insertions, 0 deletions