[Boost-bugs] [Boost C++ Libraries] #9075: Devision by zero in boost/date_time/int_adapter.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #9075: Devision by zero in boost/date_time/int_adapter.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-02 09:20:08


#9075: Devision by zero in boost/date_time/int_adapter.hpp
-------------------------------------------------+-------------------------
 Reporter: Alexander Drichel | Owner: az_sw_dude
  <alexander.drichel@…> | Status: new
     Type: Bugs | Component: date_time
Milestone: To Be Determined | Severity: Problem
  Version: Boost 1.54.0 |
 Keywords: |
-------------------------------------------------+-------------------------
 line 347
 {{{
 #!cpp
 339 /*! Provided for cases when automatic conversion from
 340 * 'int' to 'int_adapter' causes incorrect results. */
 341 int_adapter operator/(const int rhs) const
 342 {
 343 if(is_special() && rhs != 0)
 344 {
 345 return mult_div_specials(rhs);
 346 }
 347 return int_adapter<int_type>(value_ / rhs);
 348 }
 }}}
 rhs is not checked if is_special() returns false.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9075>
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:14 UTC