[Boost-bugs] [Boost C++ Libraries] #4943: easy overflow in posix_time::microseconds

Subject: [Boost-bugs] [Boost C++ Libraries] #4943: easy overflow in posix_time::microseconds
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-06 21:51:23


#4943: easy overflow in posix_time::microseconds
---------------------------------+------------------------------------------
 Reporter: gast128@… | Owner: az_sw_dude
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 we encountered an overflow in posix_time::microseconds:

 //about 40 years (1970-2010)
 const __int64 n = 1267195987000000;
 boost::posix_time::microseconds td(n); //overflow

 The overflow is easy explainable since date_time::subsecond_duration first
 multiplies it causing the overflow and then divides by 1000000.

 There are already multiple posts spended on this.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4943>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC