]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Trent Mick:
authorGuido van Rossum <guido@python.org>
Wed, 28 Jun 2000 21:18:13 +0000 (21:18 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 28 Jun 2000 21:18:13 +0000 (21:18 +0000)
commit3262e1675335e00e0f437cce921a1b22a8a33b76
tree3f17d745d3e62934003e15c96bc742662a856a5b
parent106f2dae868770f6b6ed2c949dd5b4deb07b880b
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?]
Modules/selectmodule.c