1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-09 18:26:08 +02:00

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
This commit is contained in:
Junio C Hamano 2018-06-18 10:18:43 -07:00
commit faff81287b

View File

@ -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;
}