FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (#131668) by vstinner · Pull Request #131977 · python/cpython · GitHub

/ cpython Public

[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (#131668) - #131977

Merged
vstinner merged 1 commit into
python:3.13from
vstinner:socket13
Apr 1, 2025
Merged

[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (#131668)#131977
vstinner merged 1 commit into
python:3.13from
vstinner:socket13

Conversation

vstinner commented Apr 1, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Don't pass direct references to sockaddr members since their type may not match PyArg_ParseTuple() types. Instead, use temporary 'int' and 'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string, not as an integer.

(cherry picked from commit 8cd29c2)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.

(cherry picked from commit 8cd29c2)

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 1, 2025
…onGH-131668) (pythonGH-131977)

pythongh-111178: Fix getsockaddrarg() undefined behavior (pythonGH-131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.
(cherry picked from commit c318a03)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 8cd29c2)

bedevere-app Bot commented Apr 1, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Apr 1, 2025
vstinner added a commit that referenced this pull request Apr 1, 2025
…GH-131977) (#131979)

[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (GH-131977)

gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.
(cherry picked from commit c318a03)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 8cd29c2)

Co-authored-by: Victor Stinner <vstinner@python.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL