On Wed, Jan 27, 2016 at 09:52 +0100, Martin Natano wrote: > In ufs, the calculation of i_modrev can produce signed overflow on 32 > bit architectures (found on i386). The tv.tv_usec * 4294 calculation is > designed to move the microseconds part of a struct timeval to the upper > bits of an unsigned(!) 32 bit value to make room for simple i_modrev > increments, but the calculation is performed signed, causing overflow. > The diff below gets rid of the overflow by casting to unsigned first. > > While there I replaced the union _qcvt/SETHIGH/SETLOW dance with simple > bitshift operations. >
Committed, thanks!
