@matheusbsbs / matheus-bagliano / commits / 5a17b54ad5
Fork 0

Do not ignore a detected patchfile brokenness.

find_header() function is used to read and parse the patchfile and it detects errors in the patch, but one place ignored the error and went ahead, which was quite bad. Noticed by Jeff Garzik. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 9, 2007 at 02:52 UTC 5a17b54ad5543ddca60a493c613801279cc98a34
1 file changed +1 -1
builtin-apply.c
+1 -1
@@ -812,7 +812,7 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
812 struct fragment dummy;
813 if (parse_fragment_header(line, len, &dummy) < 0)
814 continue;
815 - error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
815 + return error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
816 }
817
818 if (size < len + 6)