From: Victor Stinner Date: Thu, 2 Apr 2015 15:16:08 +0000 (+0200) Subject: Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the X-Git-Tag: v3.5.0a4~93^2^2~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e44aa5ae475be3e2944daee4d98ca36e466dd6a;p=python Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the result of sendto() instead of the C int type. --- diff --git a/Misc/NEWS b/Misc/NEWS index 7deb82012c..66ecff1468 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -24,6 +24,9 @@ Core and Builtins Library ------- +- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the + result of sendto() instead of the C int type. + - Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. - Issue #23838: linecache now clears the cache and returns an empty result on diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index e9e482e874..b6f2bf53ab 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3366,7 +3366,8 @@ sock_sendto(PySocketSockObject *s, PyObject *args) char *buf; Py_ssize_t len, arglen; sock_addr_t addrbuf; - int addrlen, n = -1, flags, timeout; + int addrlen, flags, timeout; + Py_ssize_t n = -1; flags = 0; arglen = PyTuple_Size(args);