10000 gh-111178: Fix getsockaddrarg() undefined behavior by vstinner · Pull Request #131668 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111178: Fix 8000 getsockaddrarg() undefined behavior #131668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 1, 2025
Prev Previous commit
Next Next commit
Use 'unsigned char'
  • Loading branch information
vstinner committed Mar 28, 2025
commit 9968c1eb4bea35cce8f3044c6a468ef8db51b4f4
2 changes: 1 addition & 1 deletion Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
const char *straddr;
struct sockaddr_rc *addr = &addrbuf->bt_rc;
_BT_RC_MEMB(addr, family) = AF_BLUETOOTH;
uint8_t channel = _BT_RC_MEMB(addr, channel);
unsigned char channel = _BT_RC_MEMB(addr, channel);
if (!PyArg_ParseTuple(args, "sB", &straddr,
&channel)) {
PyErr_Format(PyExc_OSError,
Expand Down
Loading
0