SHA256
1
0
forked from pool/graphviz
graphviz/graphviz-wrong_index.patch

20 lines
786 B
Diff

The second argument to the typeName function should be the ID of
a type, not a value. As typeName does no checking on it's arguments
it'll form a negative index for accessing the type names array.
Patch by Emden R. Gansner <erg@research.att.com>
Index: lib/gvpr/compile.c
===================================================================
--- lib/gvpr/compile.c.orig 2009-11-22 20:10:33.000000000 +0100
+++ lib/gvpr/compile.c 2010-06-01 12:52:04.902610547 +0200
@@ -1514,7 +1514,7 @@ setval(Expr_t * pgm, Exnode_t * x, Exid_
state->tvt = (trav_type) iv;
else
error(1, "unexpected value %d assigned to %s : ignored",
- iv, typeName(pgm, V_travtype));
+ iv, typeName(pgm, T_tvtyp));
break;
case V_travroot:
np = INT2PTR(Agnode_t *, v.integer);