Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jl/zlib-restore-nul-termination'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 18 Jun 2018 17:18:43 +0000
(10:18 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 18 Jun 2018 17:18:43 +0000
(10:18 -0700)
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
packfile.c
patch
|
blob
|
history
raw
(from parent 1:
094381e
)
diff --git
a/packfile.c
b/packfile.c
index 1a714fbde994f8b4a7bde68f1fcad1725970fe9b..7cd45aa4b2a0e098d597e4dea633d9b097b9b94c 100644
(file)
--- a/
packfile.c
+++ b/
packfile.c
@@
-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;
}