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>
This commit is contained in:
parent
875471c510
commit
b8ebe08b9a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user