lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] bug in lwip_select()


From: Zschocke, Florian
Subject: [lwip-users] bug in lwip_select()
Date: Fri, 13 Jun 2003 16:07:07 +0200

There is a bug in lwip_select(). Around line 726 I find

msectimeout =  ((timeout->tv_sec * 1000) + (timeout->tv_usec /1000));

Obviously lwip_select works with milisecond precision. This line is going to
be a problem when a user tries to call lwip_select() with a timeout of less
than 1 millisecond, say 100 nanoseconds. The division will be zero which
makes the msectimeout zero which will make select() wait forever, which is
not quite what the programmer intended. 

Florian
Zschocke




reply via email to

[Prev in Thread] Current Thread [Next in Thread]