diff -Naur boost/include/boost-1_48/boost/date_time/format_date_parser.hpp boost.patched/include/boost-1_48/boost/date_time/format_date_parser.hpp --- boost/include/boost-1_48/boost/date_time/format_date_parser.hpp 2011-12-19 17:27:15.050509400 +0100 +++ boost.patched/include/boost-1_48/boost/date_time/format_date_parser.hpp 2011-12-12 17:30:56.426881500 +0100 @@ -60,8 +60,8 @@ else { mr.cache += (*itr); } - itr++; - j++; + ++itr; + ++j; } int_type i = -1; // mr.cache will hold leading zeros. size() tells us when input is too short. @@ -711,13 +711,13 @@ itr++; //advance past format specifier } else { //skip past chars in format and in buffer - itr++; + ++itr; if (use_current_char) { use_current_char = false; current_char = *sitr; } else { - sitr++; + ++sitr; } } } diff -Naur boost/include/boost-1_48/boost/date_time/time_facet.hpp boost.patched/include/boost-1_48/boost/date_time/time_facet.hpp --- boost/include/boost-1_48/boost/date_time/time_facet.hpp 2011-12-19 17:27:15.366541000 +0100 +++ boost.patched/include/boost-1_48/boost/date_time/time_facet.hpp 2011-12-13 10:24:52.536234300 +0100 @@ -1212,15 +1212,19 @@ } else { //skip past chars in format and in buffer - ++itr; - // set use_current_char when sitr is already - // pointing at the next character to process - if (use_current_char) { - use_current_char = false; - } - else { - ++sitr; - } + if( sitr != stream_end && *itr != *sitr ) { + throw std::exception(); // mismatch in constant non format characters found + } + + ++itr; + // set use_current_char when sitr is already + // pointing at the next character to process + if (use_current_char) { + use_current_char = false; + } + else { + ++sitr; + } } }