diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-06-22 23:33:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-22 23:33:08 -0700 |
commit | 4d9b58076395899e2501b7c2b3527c998f61619e (patch) | |
tree | 1affeab373977675dd36186e076c83423ae9da81 | |
parent | 9bee7aabcd74bf112fcdaf255551147feca8f66c (diff) | |
parent | 4cd008a925f3c7c0064d86a4cb4b06278e79e9e7 (diff) | |
download | git-4d9b58076395899e2501b7c2b3527c998f61619e.tar.gz git-4d9b58076395899e2501b7c2b3527c998f61619e.tar.xz |
Merge branch 'jc/oneline'
* jc/oneline:
pp_header(): work around possible memory corruption
-rw-r--r-- | commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |