[Boost-bugs] [Boost C++ Libraries] #12180: Date time parsing with a particular format string dereferences an end iterator

Subject: [Boost-bugs] [Boost C++ Libraries] #12180: Date time parsing with a particular format string dereferences an end iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-06 10:18:05


#12180: Date time parsing with a particular format string dereferences an end
iterator
-------------------------------------+------------------------
 Reporter: sascha.zelzer@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+------------------------
 Using the "%s" format flag with an input string that does not end with
 fractional seconds leads to dereferencing of an "end" iterator, causing
 memory corruption.

 Sample code:

 {{{
 std::string fmt = "%Y-%m-%d %H:%M:%s";
 std::stringstream ss;
 ss.imbue(std::locale(ss.getloc(), new
 boost::posix_time::time_input_facet(fmt)));
 ss << "2010-05-10 10:03:05";
 boost::posix_time::ptime pt;
 ss >> pt;
 }}}

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