summaryrefslogtreecommitdiff
path: root/pack-check.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-02-19 06:21:30 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-19 09:40:37 -0800
commit5b442c4f2723211ce0d862571e88ee206bfd51bf (patch)
treea699d4fdd632c01c0a0bd29a59e490d112aede43 /pack-check.c
parentadd helpers for detecting size_t overflow (diff)
downloadtgif-5b442c4f2723211ce0d862571e88ee206bfd51bf.tar.xz
tree-diff: catch integer overflow in combine_diff_path allocation
A combine_diff_path struct has two "flex" members allocated alongside the struct: a string to hold the pathname, and an array of parent pointers. We use an "int" to compute this, meaning we may easily overflow it if the pathname is extremely long. We can fix this by using size_t, and checking for overflow with the st_add helper. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-check.c')
0 files changed, 0 insertions, 0 deletions