[PATCH STABLE] parsers: fix segfault by invalid parent revision read from revlog
Matt Mackall
mpm at selenic.com
Thu Jul 16 12:45:36 CDT 2015
On Fri, 2015-07-17 at 01:20 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1437057368 -32400
> # Thu Jul 16 23:36:08 2015 +0900
> # Branch stable
> # Node ID 6249ca2cf0a01c9325bc3537822879df4240d586
> # Parent 501c51d607922692bd6654cb3c24d9f1e31d7450
> parsers: fix segfault by invalid parent revision read from revlog
>
> If revlog file is corrupted, it can have parent pointing to invalid revision.
> So we should validate it before updating nothead[] and phases[]. Otherwise it
> would segfault at best.
This looks ok, but conflicts with default. I'd rather just apply a patch
to default since the -rc will be released in two days.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list