summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2019-02-27 17:04:28 -0800
committerGuido van Rossum <guido@python.org>2019-03-05 11:36:11 -0800
commit00fdd08bc1160510d8ed3d7a2d82bdd88e148a47 (patch)
tree7cc25ff4848d43c600953e01419b9a77627a0440 /Python/pythonrun.c
parent1851eafa63415e8dd19dc2cf78d0cac84f2fd55e (diff)
downloadcpython-git-00fdd08bc1160510d8ed3d7a2d82bdd88e148a47.tar.gz
Check flags isn't NULL before dereferencing (this broke regen-importlib)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index b763c99da0..199ea82434 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1200,7 +1200,7 @@ PyParser_ASTFromStringObject(const char *s, PyObject *filename, int start,
PyCompilerFlags localflags;
perrdetail err;
int iflags = PARSER_FLAGS(flags);
- if (flags->cf_feature_version < 7)
+ if (flags && flags->cf_feature_version < 7)
iflags |= PyPARSE_ASYNC_HACKS;
node *n = PyParser_ParseStringObject(s, filename,