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

Fix potential null pointer dereference in new_fixed_offset_ex #565

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

erosennin
Copy link
Contributor

The body of the if in new_fixed_offset_ex() was probably intended to contain the next two indented lines, but there are no braces around them, so the second line is executed even if self == NULL. This can potentially lead to a null pointer dereference if tp_alloc() returns NULL. This PR adds the missing braces.

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

@sdispater sdispater merged commit 564d343 into sdispater:master Oct 19, 2021
@sdispater
Copy link
Owner

Thanks!

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.

2 participants