diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-06-23 08:33:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-23 08:33:08 +0200 |
commit | 4d9b58076395899e2501b7c2b3527c998f61619e (patch) | |
tree | 1affeab373977675dd36186e076c83423ae9da81 /commit.c | |
parent | Merge branch 'ei/oneline+add-empty' (diff) | |
parent | pp_header(): work around possible memory corruption (diff) | |
download | git-4d9b58076395899e2501b7c2b3527c998f61619e.tar.xz git-4d9b58076395899e2501b7c2b3527c998f61619e.zip |
Merge branch 'jc/oneline'
* jc/oneline:
pp_header(): work around possible memory corruption
Diffstat (limited to 'commit.c')
-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); |