From fe7609586cdf11ca83fd61b84bb7b51f43dd5228 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 28 May 2019 11:14:24 -0700 Subject: [PATCH 1/2] Fix crash in PyAST_FromNodeObject() when flags is NULL --- Python/ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/ast.c b/Python/ast.c index 7ffdf4a2a037092..12a45f9bbb0074c 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -786,7 +786,7 @@ PyAST_FromNodeObject(const node *n, PyCompilerFlags *flags, /* borrowed reference */ c.c_filename = filename; c.c_normalize = NULL; - c.c_feature_version = flags->cf_feature_version; + c.c_feature_version = flags ? flags->cf_feature_version : PY_MINOR_VERSION; if (TYPE(n) == encoding_decl) n = CHILD(n, 0); From 7c064c64e386c53ca07cc6a0d6381e89be4917d8 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" Date: Tue, 28 May 2019 18:19:01 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2019-05-28-18-18-55.bpo-37072.1Hewl3.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2019-05-28-18-18-55.bpo-37072.1Hewl3.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-05-28-18-18-55.bpo-37072.1Hewl3.rst b/Misc/NEWS.d/next/Core and Builtins/2019-05-28-18-18-55.bpo-37072.1Hewl3.rst new file mode 100644 index 000000000000000..15bcc5ed2bb0caf --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-05-28-18-18-55.bpo-37072.1Hewl3.rst @@ -0,0 +1 @@ +Fix crash in PyAST_FromNodeObject() when flags is NULL. \ No newline at end of file