• Guido van Rossum's avatar
    Trent Mick: · 3262e167
    Guido van Rossum yazdı
    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?]
    3262e167
selectmodule.c 10.1 KB