зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
8977c110b5
Коммит
5a17b54ad5
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче