Nov. 25, 2008
3:37 p.m.
"Clive D.W. Feather" <clive@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.