diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-06-18 17:18:43 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-18 17:18:43 (GMT) |
commit | faff81287b5d69ef14408de22d3919cc7ff0ac06 (patch) | |
tree | 5937e0b794c232d98318c3bc04110e6485d7286e /packfile.c | |
parent | 094381ed79f4f0b67f30502da1202ff627261645 (diff) | |
parent | b611396e97cba09c7e1cf900190cf1a9e922546e (diff) | |
download | git-faff81287b5d69ef14408de22d3919cc7ff0ac06.zip git-faff81287b5d69ef14408de22d3919cc7ff0ac06.tar.gz git-faff81287b5d69ef14408de22d3919cc7ff0ac06.tar.bz2 |
Merge branch 'jl/zlib-restore-nul-termination'
Make zlib inflate codepath more robust against versions of zlib
that clobber unused portion of outbuf.
* jl/zlib-restore-nul-termination:
packfile: correct zlib buffer handling
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1454,6 +1454,9 @@ static void *unpack_compressed_entry(struct packed_git *p, return NULL; } + /* versions of zlib can clobber unconsumed portion of outbuf */ + buffer[size] = '\0'; + return buffer; } |