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 PyUpb_Message_MergeInternal segfault #1338

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Fix PyUpb_Message_MergeInternal segfault #1338

merged 1 commit into from
Sep 7, 2023

Conversation

messense
Copy link
Contributor

@messense messense commented Jun 1, 2023

when PyUpb_Message_MergeFromString returns NULL, currently PyUpb_Message_MergeInternal will call Py_DECREF on NULL which results in a segmentation fault.

This patch switches to Py_XDECREF to fix the segfault.

when `PyUpb_Message_MergeFromString` returns `NULL`, currently
`PyUpb_Message_MergeInternal` will call `Py_DECREF` on `NULL`
which results in a segmentation fault.

This patch switches to `Py_XDECREF` to fix the segfault.
@acozzette acozzette merged commit cefa206 into protocolbuffers:main Sep 7, 2023
@acozzette
Copy link
Member

@messense Thank you for the fix!

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