summaryrefslogtreecommitdiff
path: root/t/t4107-apply-ignore-whitespace.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-02-25 09:23:26 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-25 11:32:46 -0800
commit13e0b0d3dc76353632dcb0bc63cdf03426154317 (patch)
treea9ecffdfc2b839b81fc7b4d5aa1e543639a9cec3 /t/t4107-apply-ignore-whitespace.sh
parentnth_packed_object_offset: bounds-check extended offset (diff)
downloadtgif-13e0b0d3dc76353632dcb0bc63cdf03426154317.tar.xz
use_pack: handle signed off_t overflow
A v2 pack index file can specify an offset within a packfile of up to 2^64-1 bytes. On a system with a signed 64-bit off_t, we can represent only up to 2^63-1. This means that a corrupted .idx file can end up with a negative offset in the pack code. Our bounds-checking use_pack function looks for too-large offsets, but not for ones that have wrapped around to negative. Let's do so, which fixes an out-of-bounds access demonstrated in t5313. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4107-apply-ignore-whitespace.sh')
0 files changed, 0 insertions, 0 deletions