PuTTY bug time_t-minus-one

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Snapshot | Docs | Privacy | Changes | Wishlist

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 06434ffc713ff60f7631b48e0b1463fcfc92684b (0.58)

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: <[email protected]>
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 2016-12-27 11:40:22 +0000)