summaryrefslogtreecommitdiff
path: root/mailinfo.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-07-05 17:05:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-12 17:14:29 (GMT)
commit211c61c6cf56699fc7b520a0206d23f5e4a7261b (patch)
tree43035095197759a16d0cccb92af4264d29ad4b8e /mailinfo.h
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
downloadgit-211c61c6cf56699fc7b520a0206d23f5e4a7261b.zip
git-211c61c6cf56699fc7b520a0206d23f5e4a7261b.tar.gz
git-211c61c6cf56699fc7b520a0206d23f5e4a7261b.tar.bz2
pack-objects: pass length to check_pack_crc() without truncation
On 32 bit systems with large file support, unsigned long is 32-bit while the two offsets in the subtraction expression (pack-objects has the exact same expression as in sha1_file.c but not shown in diff) are in 64-bit. If an in-pack object is larger than 2^32 len/datalen is truncated and we get a misleading "error: bad packed object CRC for ..." as a result. Use off_t for len and datalen. check_pack_crc() already accepts this argument as off_t and can deal with 4+ GB. Noticed-by: Christoph Michelbach <michelbach94@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailinfo.h')
0 files changed, 0 insertions, 0 deletions