]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (GH-131977...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 1 Apr 2025 14:56:56 +0000 (16:56 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Apr 2025 14:56:56 +0000 (14:56 +0000)
commitafb3f33256c2f74c560c70ac00514722f177a1db
treee73d71a2dd1a823a37c56a16ea57cd6bdbc7ed18
parent756676fc18e7825c15b1a2c9bbf6a3adf033a5e2
[3.12] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (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 c318a03b17c3e58e9c46beb84ab7070b7baa303b)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
Misc/NEWS.d/next/Library/2025-03-28-11-26-31.gh-issue-131668.tcS4xS.rst [new file with mode: 0644]
Modules/socketmodule.c