diff Python/compile.c @ 16137:883cb0e31bb2 legacy-trunk

prevent symtable_params() from dereferencing off the end of the varagslist node. based on fix from Thomas Wouters.
author Jeremy Hylton <jeremy@alum.mit.edu>
date Tue, 23 Jan 2001 00:50:52 +0000
parents fb67122e5c1e
children 49b7c1bc6004
line wrap: on
line diff
--- a/Python/compile.c	Tue Jan 23 00:06:20 2001 +0000
+++ b/Python/compile.c	Tue Jan 23 00:50:52 2001 +0000
@@ -4325,6 +4325,8 @@
 			symtable_add_def(st, STR(CHILD(n, i)), 
 					 DEF_PARAM | DEF_STAR);
 			i += 2;
+			if (i >= NCH(n))
+				return;
 			c = CHILD(n, i);
 		}
 		if (TYPE(c) == DOUBLESTAR) {