]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] bpo-35191: Fix unexpected integer truncation in socket.setblocking() (GH-10415)
authorAlexey Izbyshev <izbyshev@ispras.ru>
Fri, 1 Dec 2023 15:44:03 +0000 (18:44 +0300)
committerGitHub <noreply@github.com>
Fri, 1 Dec 2023 15:44:03 +0000 (17:44 +0200)
commit0443f926becc38480fe60529ad9049ccceb635bd
treebe8e56bd11c6d52b2635ef1429a3fa378412bf2d
parenteb3c0dc66760d24fc64eaddcc705519ed621f84b
[3.11] bpo-35191: Fix unexpected integer truncation in socket.setblocking() (GH-10415)

On platforms with 64-bit long, socket.setblocking(x) treated all x
which lower 32 bits are zero as False due to integer truncation.

Reported by ubsan.
Lib/test/test_socket.py
Misc/NEWS.d/next/Library/2018-11-08-18-44-04.bpo-35191.s29bWu.rst [new file with mode: 0644]
Modules/socketmodule.c