NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/42549: year2038 problem in parsedate(3)
>Number: 42549
>Category: bin
>Synopsis: year2038 problem in parsedate(3)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 31 06:05:00 +0000 2009
>Originator: Izumi Tsutsui
>Release: NetBSD 5.99.22
>Organization:
>Environment:
System: NetBSD 5.99.22 updated around 20091213
Architecture: i386
Machine: i386
>Description:
parsedate(3) in libutil doesn't decode date with year >2038.
>How-To-Repeat:
% date
Thu Dec 31 14:53:21 JST 2009
% date -d 20381231
Fri Dec 31 00:00:00 JST 2038
% date -d 20391231
date: Cannot parse `20391231'
% date -d 20991231
date: Cannot parse `20991231'
>Fix:
Remove Year > 2038 check in src/lib/libutil/parsedate.y ?
---
/* Checking for 2038 bogusly assumes that time_t is 32 bits. But
I'm too lazy to try to check for time_t overflow in another way. */
if (Year < EPOCH || Year > 2038
---
Home |
Main Index |
Thread Index |
Old Index