aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@gmail.com>2008-10-09 00:24:16 +0300
committerShawn O. Pearce <spearce@spearce.org>2008-10-09 09:21:50 -0700
commitb8ebe08b9a643f432866eb7150c3b20d59b755f2 (patch)
tree4bcedb685bfef2f6e9b902afd865c4fa508bfd69
parent875471c510b29f920693834b43a992c99694af58 (diff)
downloadgit-b8ebe08b9a643f432866eb7150c3b20d59b755f2.tar.gz
git-b8ebe08b9a643f432866eb7150c3b20d59b755f2.tar.xz
builtin-apply: fix typo leading to stack corruption
This typo led to stack corruption for lines with whitespace fixes and length > 1024. Signed-off-by: Imre Deak <imre.deak@gmail.com> Looks-good-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--builtin-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 2c87cf57f..74f7e7924 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1697,7 +1697,7 @@ static int match_fragment(struct image *img,
fixlen = ws_fix_copy(buf, orig, oldlen, ws_rule, NULL);
/* Try fixing the line in the target */
- if (sizeof(tgtfixbuf) < tgtlen)
+ if (sizeof(tgtfixbuf) > tgtlen)
tgtfix = tgtfixbuf;
else
tgtfix = xmalloc(tgtlen);