Opened 14 years ago

Closed 14 years ago

#1903 closed Bugs (fixed)

[date_time] - 1.34+ c_local_adjustor derefs null pointer for dates >2038

Reported by: Jeff Flinn <jeffrey.flinn@…> Owned by: az_sw_dude
Milestone: Boost 1.36.0 Component: date_time
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

utc_test.cpp : Defines the entry point for the console application.

#define BOOST_DATE_TIME_NO_LIB

#include "boost/date_time/posix_time/posix_time.hpp" #include "boost/date_time/local_time_adjustor.hpp" #include "boost/date_time/c_local_time_adjustor.hpp"

int main() {

using namespace boost::posix_time; using namespace boost::gregorian;

This local adjustor depends on the machine TZ settings-- highly dangerous! typedef boost::date_time::c_local_adjustor<ptime> local_adj; ptime t10(date(2040,Jan,1), hours(7)); ptime t11 = local_adj::utc_to_local(t10);

return 0;

}

Change History (1)

comment:1 by Andrey Semashev, 14 years ago

Resolution: fixed
Status: newclosed

Although I could not reproduce the problem, I think that I've fixed it in trunk.

Note: See TracTickets for help on using tickets.