libsql icon indicating copy to clipboard operation
libsql copied to clipboard

Fix a Y2038 bug by replacing `Int32x32To64` with regular multiplication

Open CookiePLMonster opened this issue 1 year ago • 2 comments

This issue has also been reported in "upstream" SQLite, currently awaiting approval: https://sqlite.org/forum/forumpost/51e004d479

Int32x32To64 macro internally truncates the arguments to int32, while time_t is 64-bit on most/all modern platforms. Therefore, usage of this macro creates a Year 2038 bug.

I detailed this issue a while ago in a writeup, and spotted the same issue in this repository when updating the list of affected repositories: https://cookieplmonster.github.io/2022/02/17/year-2038-problem/

CookiePLMonster avatar Jan 03 '25 09:01 CookiePLMonster