Skip to content

Commit 8e44aa5

Browse files
committed
Issue python#23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
result of sendto() instead of the C int type.
1 parent e7c7492 commit 8e44aa5

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎Misc/NEWS‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Core and Builtins
2424
Library
2525
-------
2626

27+
- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
28+
result of sendto() instead of the C int type.
29+
2730
- Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
2831

2932
- Issue #23838: linecache now clears the cache and returns an empty result on

‎Modules/socketmodule.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3366,7 +3366,8 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
33663366
char *buf;
33673367
Py_ssize_t len, arglen;
33683368
sock_addr_t addrbuf;
3369-
int addrlen, n = -1, flags, timeout;
3369+
int addrlen, flags, timeout;
3370+
Py_ssize_t n = -1;
33703371

33713372
flags = 0;
33723373
arglen = PyTuple_Size(args);

0 commit comments

Comments
 (0)