Kaydet (Commit) 2b4ffd8e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix -fsanitize=signed-integer-overflow (when long int is 32-bit)

Change-Id: Ia6f1b60108784660c4a2dfd311592207e6bf5d88
üst acd62e05
...@@ -311,8 +311,8 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) ...@@ -311,8 +311,8 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
timeval Timeout; timeval Timeout;
// determine remaining timeout. // determine remaining timeout.
gettimeofday (&Timeout, 0); gettimeofday (&Timeout, 0);
nTimeoutMS = m_aTimeout.tv_sec*1000 + m_aTimeout.tv_usec/1000 nTimeoutMS = (m_aTimeout.tv_sec - Timeout.tv_sec) * 1000
- Timeout.tv_sec*1000 - Timeout.tv_usec/1000; + m_aTimeout.tv_usec/1000 - Timeout.tv_usec/1000;
if( nTimeoutMS < 0 ) if( nTimeoutMS < 0 )
nTimeoutMS = 0; nTimeoutMS = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment