Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-37072: Fix crash in PyAST_FromNodeObject() when flags is NULL #13634

Merged
merged 2 commits into from
May 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix crash in PyAST_FromNodeObject() when flags is NULL
  • Loading branch information
gvanrossum committed May 28, 2019
commit fe7609586cdf11ca83fd61b84bb7b51f43dd5228
2 changes: 1 addition & 1 deletion Python/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down