Skip to content

Commit

Permalink
Do not ignore a detected patchfile brokenness.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 9, 2007
1 parent 8977c11 commit 5a17b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
struct fragment dummy;
if (parse_fragment_header(line, len, &dummy) < 0)
continue;
error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
return error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
}

if (size < len + 6)
Expand Down

0 comments on commit 5a17b54

Please sign in to comment.