SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 89 Python

Trent Mick:

This patches fixes a possible overflow of the optional timeout
parameter for the select() function (selectmodule.c). This timeout is
passed in as a double and then truncated to an int. If the double is
sufficiently large you can get unexpected results as it
overflows. This patch raises an overflow if the given select timeout
overflows.

[GvR: To my embarrassment, the original code was assuming an int could
always hold a million.  Note that the overflow check doesn't test for
a very large *negative* timeout passed in -- but who in the world
would do such a thing?]
G
Guido van Rossum committed
3262e1675335e00e0f437cce921a1b22a8a33b76
Parent: 106f2da