git: libc: Sync asctime.c and localtime.c with tzcode2010a from elsie.

Sascha Wildner swildner at crater.dragonflybsd.org
Wed Feb 17 18:44:21 PST 2010


commit 363194c841927fea3e5744b794f4421d9b639e4d
Author: Sascha Wildner <saw at online.de>
Date:   Thu Feb 18 03:41:04 2010 +0100

    libc: Sync asctime.c and localtime.c with tzcode2010a from elsie.
    
    asctime.c:   Set errno to EINVAL and return "??? ??? ?? ??:??:?? ????\n" if
                 asctime_r() is called with a NULL struct tm pointer.
                 (Note that asctime_r() is called by ctime_r() and asctime();
                 asctime() is called by ctime().)
    
    localtime.c: Set errno to EINVAL and return WRONG if time1() is called with
                 a NULL struct tm pointer; avoid dereference if a NULL struct
                 tm pointer is passed to timelocal(), timegm(), or timeoff().
                 (Note that time1 is called by mktime(), timegm(), and timeoff();
                 mktime is called by timelocal().)

Summary of changes:
 lib/libc/stdtime/asctime.c   |   10 ++++++----
 lib/libc/stdtime/localtime.c |   16 +++++++++++-----
 2 files changed, 17 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/363194c841927fea3e5744b794f4421d9b639e4d


-- 
DragonFly BSD source repository





More information about the Commits mailing list