summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c02eee)
raw | patch | inline | side by side (parent: 8c02eee)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Fri, 1 Sep 2006 08:49:29 +0000 (10:49 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 1 Sep 2006 12:20:03 +0000 (05:20 -0700) |
Thanks to the recent malloc()->xmalloc() change, and XMALLOC_POISON, this bug
was found.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
was found.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-fmt-merge-msg.c | patch | blob | history |
index ed59e77e1923ee8f0df050dd6851b805a26127a2..432963db9006c404d4b79c7e9b5c8d539e783605 100644 (file)
--- a/builtin-fmt-merge-msg.c
+++ b/builtin-fmt-merge-msg.c
if (origin[0] == '\'' && origin[len - 1] == '\'') {
char *new_origin = xmalloc(len - 1);
memcpy(new_origin, origin + 1, len - 2);
- new_origin[len - 1] = 0;
+ new_origin[len - 2] = 0;
origin = new_origin;
} else
origin = strdup(origin);