diff options
author | Imre Deak <imre.deak@gmail.com> | 2008-10-08 23:24:16 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-10-09 18:21:50 +0200 |
commit | b8ebe08b9a643f432866eb7150c3b20d59b755f2 (patch) | |
tree | 4bcedb685bfef2f6e9b902afd865c4fa508bfd69 /builtin-apply.c | |
parent | git-stash.sh: fix flawed fix of invalid ref handling (commit da65e7c1) (diff) | |
download | git-b8ebe08b9a643f432866eb7150c3b20d59b755f2.tar.xz git-b8ebe08b9a643f432866eb7150c3b20d59b755f2.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | builtin-apply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c index 2c87cf57fd..74f7e79241 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); |