summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-01-23 00:50:52 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-01-23 00:50:52 (GMT)
commit1113cfc767e4db1f5dc4a3d223cc0cbb4f9313b8 (patch)
tree8b1b453abcd018436fbfad648905f508cce2bece
parent89a27ec01c08beeeef69bfe34a627a1ec70aca56 (diff)
downloadcpython-1113cfc767e4db1f5dc4a3d223cc0cbb4f9313b8.zip
cpython-1113cfc767e4db1f5dc4a3d223cc0cbb4f9313b8.tar.gz
cpython-1113cfc767e4db1f5dc4a3d223cc0cbb4f9313b8.tar.bz2
prevent symtable_params() from dereferencing off the end of the
varagslist node. based on fix from Thomas Wouters.
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 6ca777e..a9ff3df 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -4325,6 +4325,8 @@ symtable_params(struct symtable *st, node *n)
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) {