aboutsummaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-06-22 23:33:08 -0700
committerJunio C Hamano <gitster@pobox.com>2007-06-22 23:33:08 -0700
commit4d9b58076395899e2501b7c2b3527c998f61619e (patch)
tree1affeab373977675dd36186e076c83423ae9da81 /commit.c
parent9bee7aabcd74bf112fcdaf255551147feca8f66c (diff)
parent4cd008a925f3c7c0064d86a4cb4b06278e79e9e7 (diff)
downloadgit-4d9b58076395899e2501b7c2b3527c998f61619e.tar.gz
git-4d9b58076395899e2501b7c2b3527c998f61619e.tar.xz
Merge branch 'jc/oneline'
* jc/oneline: pp_header(): work around possible memory corruption
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index f778bf4d6..03436b1b0 100644
--- a/commit.c
+++ b/commit.c
@@ -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);