diff options
author | Jeff King <peff@peff.net> | 2018-10-31 01:13:16 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-31 14:32:30 +0900 |
commit | 0afbe3e806f48a701188eefd8d7c474cc119df53 (patch) | |
tree | 805aba5d2281a281a946f3e899759b6e932b3563 /compat/vcbuild/scripts | |
parent | Git 2.19.1 (diff) | |
download | tgif-0afbe3e806f48a701188eefd8d7c474cc119df53.tar.xz |
read_istream_pack_non_delta(): document input handling
Twice now we have scratched our heads about why the loose streaming code
needs the protection added by 692f0bc7ae (avoid infinite loop in
read_istream_loose, 2013-03-25), but the similar code in its pack
counterpart does not.
The short answer is that use_pack() will die before it lets us run out
of bytes. Note that this could mean reading garbage (including the
trailing hash) from the packfile in some cases of corruption, but that's
OK. zlib will notice and complain (and if not, certainly the end result
will not match the object hash we expect).
Let's leave a comment this time to document our findings.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/vcbuild/scripts')
0 files changed, 0 insertions, 0 deletions