mktime: fix unlikely race+overflow bug
commit1cb440df7dd28fc93c965ec7fb2d4745eb361393
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Sep 2018 09:53:31 +0000 (2 02:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Sep 2018 09:54:10 +0000 (2 02:54 -0700)
tree49815e7516d240bb96a37c6d5a1e9218b5344d96
parent15343c31c678b9a50b7930346b78e19971b0054c
mktime: fix unlikely race+overflow bug

Problem reported by Alexandre Oliva in:
https://sourceware.org/bugzilla/show_bug.cgi?id=16346
* lib/mktime.c (__mktime_internal): Access *OFFSET only once,
to avoid an unlikely race if the compiler delays a load and
if this cascades into a signed integer overflow.
ChangeLog
lib/mktime.c