packfile: fix off-by-one error in decoding logic
commita5c97b016421a2869b460bbf6bdcd43dc186d433
authorJunio C Hamano <gitster@pobox.com>
Wed, 12 Jan 2022 20:11:42 +0000 (12 12:11 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Jan 2022 20:14:49 +0000 (12 12:14 -0800)
tree379e1385ca8349e177c6b186b867010b0f60cab0
parent34de5b8eac2743497bc1785f661b4184adce21f3
packfile: fix off-by-one error in decoding logic

shift count being exactly at 7-bit smaller than the long is OK; on
32-bit architecture, shift count starts at 4 and goes through 11, 18
and 25, at which point the guard triggers one iteration too early.

Reported-by: Marc Strapetz <marc.strapetz@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c