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-34987: Fix a possible null pointer dereference in _pickle.c's save_reduce() #9886

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Oct 15, 2018

@@ -3840,6 +3840,9 @@ save_reduce(PicklerObject *self, PyObject *args, PyObject *obj)

if (obj != NULL) {
obj_class = get_class(obj);
if (obj_class == NULL) {
return -1;
}
p = obj_class != cls; /* true iff a problem */
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
p = obj_class != cls; /* true iff a problem */
p = obj_class != cls;

@serhiy-storchaka serhiy-storchaka merged commit 25d3897 into python:master Dec 5, 2018
@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-10932 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2018
…e_reduce(). (pythonGH-9886)

(cherry picked from commit 25d3897)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@bedevere-bot
Copy link

GH-10933 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2018
…e_reduce(). (pythonGH-9886)

(cherry picked from commit 25d3897)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Dec 5, 2018
…e_reduce(). (GH-9886)

(cherry picked from commit 25d3897)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Dec 5, 2018
…e_reduce(). (GH-9886)

(cherry picked from commit 25d3897)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
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