quickjs
quickjs copied to clipboard
NULL dereference in win32 if getTimezoneOffset() is given pre-1970
Commit e66ce48 introduced use of gmtime() on win32 but doesn’t check that the pointer it returns is non-NULL. As it happens, that function returns NULL if the given date precedes 1970.
Ideally this should be fixed, but at a minimum getTimezoneOffset() should check the pointer that gmtime() returns.