[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH v3] builtin/apply: handle parse_binary() failure
From: Christian Couder <christian.couder () gmail ! com>
Date: 2016-03-31 22:26:26
Message-ID: CAP8UFD2vx17KDf5HgSYYZudbXiq7CYDg0=hXbJuJrLp9QDfJUg () mail ! gmail ! com
[Download RAW message or body]
On Fri, Mar 18, 2016 at 1:30 PM, Christian Couder
<christian.couder@gmail.com> wrote:
> 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>
> ---
> Only the title of the patch changed in this version compared to v2.
It looks like this patch is not in pu. Maybe it has fallen through the cracks?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic