changeset 15032:eb87fbc6d702 stable

graphlog: attempt to fix index overrun (issue2912) This bug may be caused by file subgraphs have more than two parents per node. I have no idea if this fix is correct as the graphlog code is mysterious, but it seems to be fine on the available test case.
author Matt Mackall <mpm@selenic.com>
date Wed, 10 Aug 2011 13:25:35 -0500
parents f32a2989ff58
children 2ef2d3a5cd2d
files hgext/graphlog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/graphlog.py	Fri Aug 05 00:39:54 2011 +0200
+++ b/hgext/graphlog.py	Wed Aug 10 13:25:35 2011 -0500
@@ -95,6 +95,8 @@
         elif start == end:
             interline[2 * start] = "|"
         else:
+            if 2 * end >= len(nodeline):
+                continue
             nodeline[2 * end] = "+"
             if start > end:
                 (start, end) = (end, start)