[PATCH] Fix 32-bit overflow in Divesoft Freedom time handling

Linus Torvalds torvalds at linux-foundation.org
Sat Oct 3 04:47:11 PDT 2015


On Oct 3, 2015 7:03 AM, "Dirk Hohndel" <dirk at hohndel.org> wrote:
>
> Which then means that the old code was actually correct and the fix and
> the fix of the fix were actually wrong?

Well, the final add (to convert from 2000-based numbers to 1970-based ones)
should still be done in timestamp_t. Otherwise you overflow in signed int
in 2038 (the Unix 32-bit time_t overflow date)

So I think the only thing that needs to be fixed is to change the uint32_t
to just a int32_t.

     Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151003/61c89151/attachment.html>


More information about the subsurface mailing list