[Libreoffice-commits] core.git: vcl/headless
Stephan Bergmann
sbergman at redhat.com
Tue Oct 28 09:43:22 PDT 2014
vcl/headless/svpinst.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2b4ffd8e333dee31ee7df58f693d8eff9ec5a93e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 28 17:42:48 2014 +0100
Fix -fsanitize=signed-integer-overflow (when long int is 32-bit)
Change-Id: Ia6f1b60108784660c4a2dfd311592207e6bf5d88
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 3f20e19..3bb44e0 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -311,8 +311,8 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
timeval Timeout;
// determine remaining timeout.
gettimeofday (&Timeout, 0);
- nTimeoutMS = m_aTimeout.tv_sec*1000 + m_aTimeout.tv_usec/1000
- - Timeout.tv_sec*1000 - Timeout.tv_usec/1000;
+ nTimeoutMS = (m_aTimeout.tv_sec - Timeout.tv_sec) * 1000
+ + m_aTimeout.tv_usec/1000 - Timeout.tv_usec/1000;
if( nTimeoutMS < 0 )
nTimeoutMS = 0;
}
More information about the Libreoffice-commits
mailing list