{"thread":{"id":"15834","subject":"[PATCH] builtin-apply: fix typo leading to stack corruption","startedAt":"2008-10-08T21:24:16Z","lastAt":"2008-10-08T21:24:16Z","messageCount":1,"participants":["Imre Deak"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"92670","messageId":"48ee0b28.04eb300a.03f6.fffffe21@mx.google.com","threadId":"15834","inReplyTo":null,"subject":"[PATCH] builtin-apply: fix typo leading to stack corruption","fromName":"Imre Deak","fromEmail":"imre.deak@gmail.com","sentAt":"2008-10-08T21:24:16Z","receivedAt":"2008-10-08T21:24:16Z","isPatch":true,"sender":{"key":"imre.deak@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1049948?v=4"},"body":"This typo led to stack corruption for lines > 1024 if whitespace fixing\nis in effect.\n\nSigned-off-by: Imre Deak <imre.deak@gmail.com>\n\n---\n builtin-apply.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-apply.c b/builtin-apply.c\nindex 20bef1f..720dc7f 100644\n--- a/builtin-apply.c\n+++ b/builtin-apply.c\n@@ -1696,7 +1696,7 @@ static int match_fragment(struct image *img,\n \t\tfixlen = ws_fix_copy(buf, orig, oldlen, ws_rule, NULL);\n \n \t\t/* Try fixing the line in the target */\n-\t\tif (sizeof(tgtfixbuf) < tgtlen)\n+\t\tif (sizeof(tgtfixbuf) > tgtlen)\n \t\t\ttgtfix = tgtfixbuf;\n \t\telse\n \t\t\ttgtfix = xmalloc(tgtlen);\n-- \n1.6.0.2.308.g754c\n"}]}