Re: [PATCH] sha1_name: fix uninitialized memory errors

2018-02-26 Thread Jeff King
On Mon, Feb 26, 2018 at 09:56:47AM -0500, Derrick Stolee wrote: > diff --git a/sha1_name.c b/sha1_name.c > index 611c7d2..44dd595 100644 > --- a/sha1_name.c > +++ b/sha1_name.c > @@ -546,17 +546,12 @@ static void find_abbrev_len_for_pack(struct packed_git > *p, >* nearby for the

[PATCH] sha1_name: fix uninitialized memory errors

2018-02-26 Thread Derrick Stolee
During abbreviation checks, we navigate to the position within a pack-index that an OID would be inserted and check surrounding OIDs for the maximum matching prefix. This position may be beyond the last position, because the given OID is lexicographically larger than every OID in the pack. Then