[PATCH stable] patch: fix segfault against unified diffs which start line is zero

Matt Mackall mpm at selenic.com
Sat May 12 03:02:38 CDT 2012


On Sat, 2012-05-12 at 16:14 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1336806601 -32400
> # Branch stable
> # Node ID 2910f6a0748829896685bfd64877409fce33d813
> # Parent  e6dfbc5df76fe96f73ca204b1d10cd27a814e890
> patch: fix segfault against unified diffs which start line is zero

Queued for stable, thanks. I've also added a range check in testhunk and
spent some time spelunking the Python source to convince myself this bug
isn't exploitable. You can trick Python into reading arbitrary memory,
but it doesn't seem like you can hijack the execution flow.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list