]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Trent Mick <trentm@activestate.com>:
authorFred Drake <fdrake@acm.org>
Fri, 30 Jun 2000 02:46:07 +0000 (02:46 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 30 Jun 2000 02:46:07 +0000 (02:46 +0000)
commita04eaad5c761451fdfeb5754c405c13248de1d3b
tree5f9b49666eabcfa3c79bec1f7ca6918311ce1be5
parent5cdaf26be35157a4067d6e530a56ac35cae95e26
Trent Mick <trentm@activestate.com>:
This patch fixes possible overflows in the socket module for 64-bit
platforms (mainly Win64). The changes are:

- abstract the socket type to SOCKET_T (this is SOCKET on Windows, int
on Un*x), this is necessary because sizeof(SOCKET) > sizeof(int) on
Win64

- use INVALID_SOCKET on Win32/64 for an error return value for
accept()

- ensure no overflow of the socket variable for: (1) a PyObject return
value (use PyLong_FromLongLong if necessary); and (2) printf
formatting in repr().

Closes SourceForge patch #100516.
Modules/socketmodule.c