summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8977c11)
raw | patch | inline | side by side (parent: 8977c11)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 9 Jan 2007 10:52:31 +0000 (02:52 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 9 Jan 2007 10:56:43 +0000 (02:56 -0800) |
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>
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>
builtin-apply.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index 61f047fd45383ac64f27bef88e41b56efefdea3b..6a06be3025d0455259d7a94a884433b8998dbb99 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -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)