aboutsummaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-23 12:31:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-23 12:31:59 -0700
commit5e224a2ed01facb1233474dd169307f499e70257 (patch)
tree0dd1be2bcb0233828361603b68cccfb85fec9a51 /apply.c
parent5831b563a442e7c3198a444a51d8caba4d072506 (diff)
downloadgit-5e224a2ed01facb1233474dd169307f499e70257.tar.gz
git-5e224a2ed01facb1233474dd169307f499e70257.tar.xz
git-apply: bad patch fragments are fatal
Don't just stop at them and look for the next header. Die, die, die!
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index 85d7965da..536b06829 100644
--- a/apply.c
+++ b/apply.c
@@ -240,7 +240,7 @@ static int apply_single_patch(char *line, unsigned long size)
while (size > 4 && !memcmp(line, "@@ -", 4)) {
int len = apply_fragment(line, size);
if (len <= 0)
- break;
+ die("corrupt patch");
printf("applying fragment:\n%.*s\n\n", len, line);