[Python-checkins] cpython (2.7): check for NULL
benjamin.peterson
python-checkins at python.org
Thu Mar 22 13:58:11 CET 2012
http://hg.python.org/cpython/rev/ad5e93ae22ef
changeset: 75873:ad5e93ae22ef
branch: 2.7
user: Benjamin Peterson <benjamin at python.org>
date: Thu Mar 22 08:56:15 2012 -0400
summary:
check for NULL
files:
Python/future.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Python/future.c b/Python/future.c
--- a/Python/future.c
+++ b/Python/future.c
@@ -86,7 +86,7 @@
if (s->kind == ImportFrom_kind) {
PyObject *modname = s->v.ImportFrom.module;
- if (PyString_GET_SIZE(modname) == 10 &&
+ if (modname && PyString_GET_SIZE(modname) == 10 &&
!strcmp(PyString_AS_STRING(modname), "__future__")) {
if (done) {
PyErr_SetString(PyExc_SyntaxError,
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list