Skip to content

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

Merged
serhiy-storchaka merged 1 commit intopython:2.7from
izbyshev:backport-28853a2-2.7
Aug 22, 2018
Merged

[2.7] bpo-34457: Python/ast.c: Add missing NULL check to alias_for_im…#8858
serhiy-storchaka merged 1 commit intopython:2.7from
izbyshev:backport-28853a2-2.7

Conversation

@izbyshev
Copy link
Contributor

@izbyshev izbyshev commented Aug 22, 2018

…port_name(). (GH-8852)

Reported by Svace static analyzer..
(cherry picked from commit 28853a2)

Co-authored-by: Alexey Izbyshev izbyshev@ispras.ru

https://bugs.python.org/issue34457

…port_name(). (pythonGH-8852)

Reported by Svace static analyzer..
(cherry picked from commit 28853a2)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
break;
case STAR:
str = PyString_InternFromString("*");
if (!str)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which case the if sentence could fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an unlikely case of one-character-string cache miss combined with memory allocation failure.

@serhiy-storchaka serhiy-storchaka merged commit 5223ce2 into python:2.7 Aug 22, 2018
@izbyshev izbyshev deleted the backport-28853a2-2.7 branch August 22, 2018 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants