Yoann Vandoorselaere wrote: > > during this conversion an integer overflow could occur in at least 2 > > places > > (1. result->tv_sec = x->tv_sec - y->tv_sec > > 2. (res.tv_sec * 1000) + (res.tv_usec / 1000)). > > You might want to push your #1 changes up to the GLIBC team: the > timeval_subtract function is provided from the LIBC documentation: > > http://www.gnu.org/software/libtool/manual/libc/Elapsed-Time.html
Hmm, maybe that code assumes that the tv_sec field cannot be < 0. Then there is no integer overflow at 1., only at 2. Bruno