]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-111178: Fix getsockaddrarg() undefined behavior (#131668)
authorVictor Stinner <vstinner@python.org>
Tue, 1 Apr 2025 13:54:27 +0000 (15:54 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Apr 2025 13:54:27 +0000 (13:54 +0000)
commit8cd29c2b533e5a1a262238695d05f2a7c44d6455
treee11b69429655be7e1ecaa98a25eee3a67e7dd5b2
parent3b3720f1a26ab34377542b48eb6a6565f78ff892
gh-111178: Fix getsockaddrarg() undefined behavior (#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.
Misc/NEWS.d/next/Library/2025-03-28-11-26-31.gh-issue-131668.tcS4xS.rst [new file with mode: 0644]
Modules/socketmodule.c