git: libc/stdtime: Avoid signed overflow in mktime.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Sat May 5 03:37:34 PDT 2018


commit 4a6f8e6b9a11131f19560d667e59581f9f089df9
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Fri May 4 17:10:08 2018 +0300

    libc/stdtime: Avoid signed overflow in mktime.
    
    Fixes runtime issue with gcc80 -O2 constant folding. We need to use
    __generic() macro to properly detect and set LONG_MIN/LONG_MAX here.

Summary of changes:
 lib/libc/stdtime/localtime.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4a6f8e6b9a11131f19560d667e59581f9f089df9


-- 
DragonFly BSD source repository


More information about the Commits mailing list