summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-01-09 02:52:31 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2007-01-09 02:56:43 -0800
commit5a17b54ad5543ddca60a493c613801279cc98a34 (patch)
tree6165561c6e63a43dee372b7d7dfc5f2d8be1a96d /builtin-apply.c
parentpack-check.c::verify_packfile(): don't run SHA-1 update on huge data (diff)
downloadtgif-5a17b54ad5543ddca60a493c613801279cc98a34.tar.xz
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>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 61f047fd45..6a06be3025 100644
--- 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)