summaryrefslogtreecommitdiffstats
path: root/Python/future.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-03-10 02:15:37 (GMT)
committerFred Drake <fdrake@acm.org>2001-03-10 02:15:37 (GMT)
commit198457a9789cbb176d7d0b3c8b38254b33836deb (patch)
treeadc5b0806351b583e13a5ec2f035c3ab7c1e9e28 /Python/future.c
parent0a3939fc7117edbca8d7946c3e892937649758b5 (diff)
downloadcpython-198457a9789cbb176d7d0b3c8b38254b33836deb.zip
cpython-198457a9789cbb176d7d0b3c8b38254b33836deb.tar.gz
cpython-198457a9789cbb176d7d0b3c8b38254b33836deb.tar.bz2
When iterating over the names imported in a future statement, ignore the
commas in the concrete syntax; checking those causes a segfault. This fixes SF bug #407394.
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 89466f0..cf2dca5 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -19,7 +19,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename)
REQ(n, import_stmt); /* must by from __future__ import ... */
- for (i = 3; i < NCH(n); ++i) {
+ for (i = 3; i < NCH(n); i += 2) {
ch = CHILD(n, i);
if (TYPE(ch) == STAR) {
PyErr_SetString(PyExc_SyntaxError,