Opened 9 years ago
Last modified 9 years ago
#9075 new Bugs
Devision by zero in boost/date_time/int_adapter.hpp
Reported by: | Owned by: | az_sw_dude | |
---|---|---|---|
Milestone: | To Be Determined | Component: | date_time |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
line 347
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.
Note:
See TracTickets
for help on using tickets.
Note that just above this (on lines 358-362) there is:
so I think that this is deliberate.
I don't know what *should* happen here.