This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: fix socket module for 64-bits (mostly Win64)
Type: Stage:
Components: None Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, tim.peters, tmick
Priority: normal Keywords: patch

Created on 2000-06-07 03:16 by tmick, last changed 2022-04-10 16:02 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
None tmick, 2000-06-07 03:16 None
Messages (5)
msg32750 - (view) Author: Trent Mick (tmick) (Python triager) Date: 2000-06-07 03:16
 
msg32751 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2000-06-30 02:47
Checked in verbatim.
msg32752 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2000-06-28 21:08
Accepted and assigned back to Trent.
I'm starting to hate Win64 <wink>.
msg32753 - (view) Author: Trent Mick (tmick) (Python triager) Date: 2000-06-07 03:17
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims").  To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.

I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation.  I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
msg32754 - (view) Author: Trent Mick (tmick) (Python triager) Date: 2000-06-07 03:19
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()
History
Date User Action Args
2022-04-10 16:02:00adminsetgithub: 32439
2000-06-07 03:16:45tmickcreate