In order to be sure we have enough space to use with any hash algorithm,
use GIT_MAX_HEXSZ to allocate space.
Signed-off-by: brian m. carlson <redacted>
Signed-off-by: Junio C Hamano <redacted>
int abbrev_len)
{
int r;
- strbuf_grow(sb, GIT_SHA1_HEXSZ + 1);
+ strbuf_grow(sb, GIT_MAX_HEXSZ + 1);
r = find_unique_abbrev_r(sb->buf + sb->len, oid, abbrev_len);
strbuf_setlen(sb, sb->len + r);
}