aboutsummaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
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 20c41c514..01bcb947e 100644
--- a/apply.c
+++ b/apply.c
@@ -568,7 +568,7 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
*/
if (!memcmp("diff --git ", line, 11)) {
int git_hdr_len = parse_git_header(line, len, size, patch);
- if (git_hdr_len < 0)
+ if (git_hdr_len <= len)
continue;
if (!patch->old_name && !patch->new_name)
die("git diff header lacks filename information (line %d)", linenr);