8000 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 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
Simplify code
  • Loading branch information
vstinner committed Mar 24, 2025
commit 1aebf4c908b9fbac3d5c921c7977d9d1c36dc229
3 changes: 1 addition & 2 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,10 +2044,9 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
struct sockaddr_l2 *addr = &addrbuf->bt_l2;
memset(addr, 0, sizeof(struct sockaddr_l2));
_BT_L2_MEMB(addr, family) = AF_BLUETOOTH;
_BT_L2_MEMB(addr, bdaddr_type) = BDADDR_BREDR;
int psm;
int cid = _BT_L2_MEMB(addr, cid);
unsigned char bdaddr_type = _BT_L2_MEMB(addr, bdaddr_type);
unsigned char bdaddr_type = BDADDR_BREDR;
if (!PyArg_ParseTuple(args, "si|iB", &straddr,
&psm,
&cid,
Expand Down
Loading
0