PuTTY bug time_t-minus-one

This is a mirror. The primary PuTTY web site can be found here.

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: time() returning (time_t)-1 is mishandled
class: bug: This is clearly an actual problem we want fixed.
difficulty: fun: Just needs tuits, and not many of them.
priority: medium: This should be fixed one day.
present-in: 2003-02-09
fixed-in: 2005-01-10 (0.58) (0.59) (0.60)

In various places, PuTTY calls time() and passes the result straight to
localtime() without checking whether the result was (time_t)-1, which
indicates that time() couldn't return the correct answer.  Doing this
invokes undefined behaviour (a GPF on Windows), which is Bad.  PuTTY
should do something more sensible when presented with (time_t)-1.

In current versions of Windows this manifests when the system clock is
set to dates around 2038.

Ref: <20020211221424.GA12404@boerde.de>
Ref: <001f01c2d091$74f19560$af00a8c0@dual>

Audit trail for this bug.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2005-01-09 14:41:11 +0000)