prevent symtable_params() from dereferencing off the end of the

varagslist node. based on fix from Thomas Wouters.
This commit is contained in:
Jeremy Hylton 2001-01-23 00:50:52 +00:00
parent 89a27ec01c
commit 1113cfc767

View file

@ -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) {