1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 04:46:30 +02:00

Merge branch 'jc/oneline'

* jc/oneline:
  pp_header(): work around possible memory corruption
This commit is contained in:
Junio C Hamano 2007-06-22 23:33:08 -07:00
commit 4d9b580763

View File

@ -997,7 +997,7 @@ static void pp_header(enum cmit_fmt fmt,
len = linelen;
if (fmt == CMIT_FMT_EMAIL)
len = bound_rfc2047(linelen, encoding);
ALLOC_GROW(*buf_p, *ofs_p + len, *space_p);
ALLOC_GROW(*buf_p, *ofs_p + len + 80, *space_p);
dst = *buf_p + *ofs_p;
*ofs_p += add_user_info("Author", fmt, dst,
line + 7, dmode, encoding);
@ -1008,7 +1008,7 @@ static void pp_header(enum cmit_fmt fmt,
len = linelen;
if (fmt == CMIT_FMT_EMAIL)
len = bound_rfc2047(linelen, encoding);
ALLOC_GROW(*buf_p, *ofs_p + len, *space_p);
ALLOC_GROW(*buf_p, *ofs_p + len + 80, *space_p);
dst = *buf_p + *ofs_p;
*ofs_p += add_user_info("Commit", fmt, dst,
line + 10, dmode, encoding);