From: Jeremy Hylton Date: Tue, 23 Jan 2001 00:50:52 +0000 (+0000) Subject: prevent symtable_params() from dereferencing off the end of the X-Git-Tag: v2.1a1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1113cfc767e4db1f5dc4a3d223cc0cbb4f9313b8;p=python prevent symtable_params() from dereferencing off the end of the varagslist node. based on fix from Thomas Wouters. --- diff --git a/Python/compile.c b/Python/compile.c index 6ca777e5bb..a9ff3dffdb 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) {