KEMBAR78
gh-106831: Fix `NULL` check of `d2i_SSL_SESSION` result in `_ssl.c` by sobolevn · Pull Request #106832 · python/cpython · GitHub
Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jul 17, 2023

@vstinner you've recently commited to this module, would you have time to take a look at the fix I am proposing? :)

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

@vstinner you've recently commited to this module, would you have time to take a look at the fix I am proposing? :)

Oh no. What did I do?

@sobolevn
Copy link
Member Author

Oh no. What did I do?

😆 ad95c72

Done, I've addressed your review. Thanks for the quick feedback 👍

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

const_p = senc;
newsession = d2i_SSL_SESSION(NULL, &const_p, slen);
if (session == NULL) {
if (newsession == NULL) {
Copy link
Member

Choose a reason for hiding this comment

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

Oh, now I see the typo! Previous, session was checked, but newsession must checked! Nicely spotted.

@vstinner vstinner enabled auto-merge (squash) July 17, 2023 19:28
@vstinner vstinner added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jul 17, 2023
@vstinner vstinner merged commit ebf2c56 into python:main Jul 17, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2023
…pythonGH-106832)

(cherry picked from commit ebf2c56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

GH-106835 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 17, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2023
…pythonGH-106832)

(cherry picked from commit ebf2c56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

GH-106836 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 17, 2023
vstinner pushed a commit that referenced this pull request Jul 17, 2023
GH-106832) (#106836)

gh-106831: Fix NULL check of d2i_SSL_SESSION() result in _ssl.c (GH-106832)
(cherry picked from commit ebf2c56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
vstinner pushed a commit that referenced this pull request Jul 17, 2023
GH-106832) (#106835)

gh-106831: Fix NULL check of d2i_SSL_SESSION() result in _ssl.c (GH-106832)
(cherry picked from commit ebf2c56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants