]> git.ipfire.org Git - thirdparty/git.git/commit - archive-tar.c
archive-tar: report wrong pax extended header length
authorRené Scharfe <l.s.r@web.de>
Sat, 17 Aug 2019 16:23:52 +0000 (18:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Aug 2019 17:47:28 +0000 (10:47 -0700)
commit4060c1990a9cceb710808bd4b4ab94d2355aefff
tree0d3656cbafb936c784653b8de4c4f2ed9cf11d83
parentaeb582a98374c094361cba1bd756dc6307432c42
archive-tar: report wrong pax extended header length

Extended header entries contain a length value that is a bit tricky to
calculate because it includes its own length (number of decimal digits)
as well.  We get it wrong in corner cases.  Add a check, report wrong
results as a warning and add a test for exercising it.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-tar.c
t/t5004-archive-corner-cases.sh