Git Product home page Git Product logo

Comments (5)

tmick avatar tmick commented on May 20, 2024

from cpython.

freddrake avatar freddrake commented on May 20, 2024

Checked in verbatim.

from cpython.

tim-one avatar tim-one commented on May 20, 2024

Accepted and assigned back to Trent.
I'm starting to hate Win64 <wink>.

from cpython.

tmick avatar tmick commented on May 20, 2024

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.

from cpython.

tmick avatar tmick commented on May 20, 2024

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()

from cpython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.