diff --git a/packfile.c b/packfile.c index 4a5fe7ab18..d555699217 100644 --- a/packfile.c +++ b/packfile.c @@ -1422,6 +1422,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; }