]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/index-pack.c
index-pack: correct "offset" type in unpack_entry_data()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 13 Jul 2016 15:44:02 +0000 (17:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Jul 2016 16:15:08 +0000 (09:15 -0700)
commitda49a7da3ad5e31fa858a6d48d8a6af9c4690724
treefbdf2983e7c31fff8a024b04d887e71b3519da79
parentfd3e67474c0b349049ccff5f72a50ef930a56013
index-pack: correct "offset" type in unpack_entry_data()

unpack_entry_data() receives an off_t value from unpack_raw_entry(),
which could be larger than unsigned long on 32-bit systems with large
file support. Correct the type so truncation does not happen. This
only affects bad object reporting though.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c