Skip to content

Conversation

miss-islington
Copy link
Contributor

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)

…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)
@vstinner vstinner enabled auto-merge (squash) April 1, 2025 14:45
@vstinner vstinner merged commit afb3f33 into python:3.12 Apr 1, 2025
30 checks passed
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.

2 participants