Commit 5223ce21 authored by Alexey Izbyshev's avatar Alexey Izbyshev Committed by Serhiy Storchaka

[2.7] bpo-34457: Python/ast.c: Add missing NULL check to...

[2.7] bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852) (GH-8858)

Reported by Svace static analyzer.
(cherry picked from commit 28853a24)
Co-authored-by: default avatarAlexey Izbyshev <izbyshev@ispras.ru>
parent eb9a1c01
......@@ -2520,6 +2520,8 @@ alias_for_import_name(struct compiling *c, const node *n, int store)
break;
case STAR:
str = PyString_InternFromString("*");
if (!str)
return NULL;
PyArena_AddPyObject(c->c_arena, str);
return alias(str, NULL, c->c_arena);
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment