zdump loop problem

Paul Eggert eggert at CS.UCLA.EDU
Tue Nov 25 15:37:36 UTC 2008


"Clive D.W. Feather" <clive at demon.net> writes:

> Apart from that, the overflow can only occur if cuthitime is extremely
> negative (within 43,200 of the most negative value). I don't have the code
> to hand and Google only points me at a Hungarian version, so I can't check
> if that can ever happen.

It can also happen if time_t is unsigned and cuthitme is less than
43200, i.e., cuthitime is close to 1970-01-01.  This was the scenario I
was more worried about.  Unsigned time_t is rare but not unheard of.
(These days, I expect it's more common than 16-bit int, for zdump ports
anyway....)

> Incidentally, does setabsolutes() have the same problem in it?

Could be; I haven't looked into it.



More information about the tz mailing list