From b8ebe08b9a643f432866eb7150c3b20d59b755f2 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Thu, 9 Oct 2008 00:24:16 +0300 Subject: [PATCH] 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 Looks-good-by: Junio C Hamano Signed-off-by: Shawn O. Pearce --- builtin-apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.32.0.93.g670b81a890