summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-22 18:54:19 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-22 18:54:19 -0700
commit4d8df3feb806ef85693a9f7c4b8c20ca5c1caa56 (patch)
tree82a6c78b367b284e3ee371e7530c5fec5f7857ea /diff.c
parentMerge branch 'jc/fmt-patch' into next (diff)
parentRemove possible segfault in http-fetch. (diff)
downloadtgif-4d8df3feb806ef85693a9f7c4b8c20ca5c1caa56.tar.xz
Merge branch 'se/http' into next
* se/http: Remove possible segfault in http-fetch. Install git builtins into gitexecdir rather than bindir. Change GIT-VERSION-GEN to call git commands with "git" not "git-". cvsimport: replace anonymous sub ref with a normal sub cvsimport: minor fixups Problem: 'trap...exit' causes error message when /bin/sh is ash. Avoid segfault in diff --stat rename output. Tutorial #2: broken link fix. git help: remove whatchanged from list of common commands
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 7f35e595c9..a7bb9b95bd 100644
--- a/diff.c
+++ b/diff.c
@@ -237,7 +237,7 @@ static char *pprint_rename(const char *a, const char *b)
if (a_midlen < 0) a_midlen = 0;
if (b_midlen < 0) b_midlen = 0;
- name = xmalloc(len_a + len_b - pfx_length - sfx_length + 7);
+ name = xmalloc(pfx_length + a_midlen + b_midlen + sfx_length + 7);
sprintf(name, "%.*s{%.*s => %.*s}%s",
pfx_length, a,
a_midlen, a + pfx_length,