summaryrefslogtreecommitdiff
path: root/perl/Git/SVN/GlobSpec.pm
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2020-11-30 19:27:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-30 22:35:00 (GMT)
commit6031af387e7d0554d3202e0039d9d9af1691a6a4 (patch)
tree5ba2e0029e22217d4bd8ebc819f971a7ef9bb2a6 /perl/Git/SVN/GlobSpec.pm
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-6031af387e7d0554d3202e0039d9d9af1691a6a4.zip
git-6031af387e7d0554d3202e0039d9d9af1691a6a4.tar.gz
git-6031af387e7d0554d3202e0039d9d9af1691a6a4.tar.bz2
fetch-pack: disregard invalid pack lockfiles
9da69a6539 (fetch-pack: support more than one pack lockfile, 2020-06-10) started to use a string_list for pack lockfile names instead of a single string pointer. It removed a NULL check from transport_unlock_pack() as well, which is the function that eventually deletes these lockfiles and releases their name strings. index_pack_lockfile() can return NULL if it doesn't like the contents it reads from the file descriptor passed to it. unlink(2) is declared to not accept NULL pointers (at least with glibc). Undefined Behavior Sanitizer together with Address Sanitizer detects a case where a NULL lockfile name is passed to unlink(2) by transport_unlock_pack() in t1060 (make SANITIZE=address,undefined; cd t; ./t1060-object-corruption.sh). Reinstate the NULL check to avoid undefined behavior, but put it right at the source, so that the number of items in the string_list reflects the number of valid lockfiles. Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl/Git/SVN/GlobSpec.pm')
0 files changed, 0 insertions, 0 deletions