diff options
author | Christian Couder <christian.couder@gmail.com> | 2016-03-18 13:30:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-01 10:21:19 -0700 |
commit | 484e77615872b2a62775a6a2dcb1cad0f529c5d3 (patch) | |
tree | e1ea714c0b2c1be68adc4d160816f648ed5fa390 /Documentation/git-fetch.txt | |
parent | apply: remove unused call to free() in gitdiff_{old,new}name() (diff) | |
download | tgif-484e77615872b2a62775a6a2dcb1cad0f529c5d3.tar.xz |
builtin/apply: handle parse_binary() failure
In parse_binary() there is:
forward = parse_binary_hunk(&buffer, &size, &status, &used);
if (!forward && !status)
/* there has to be one hunk (forward hunk) */
return error(_("unrecognized binary patch at line %d"), linenr-1);
so parse_binary() can return -1, because that's what error() returns.
Also parse_binary_hunk() sets "status" to -1 in case of error and
parse_binary() does "if (status) return status;".
In this case parse_chunk() should not add -1 to the patchsize it computes.
It is better for future libification efforts to make it just return -1.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-fetch.txt')
0 files changed, 0 insertions, 0 deletions