CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2018/03/29 10:34:25

Modified files:
        lib/libc/locale: setlocale.c 
        regress/lib/libc/locale/setlocale: setlocale.c 

Log message:
Fix three bugs in setlocale(3):
1. setlocale(LC_ALL, "A"); setlocale(LC_CTYPE, "T"); setlocale(LC_ALL, NULL);
must return "A/T/A/A/A/A", not "A".  Fix this by always initializing the
LC_ALL entry of newgl to "" in dupgl().  Reported by Karl Williamson
<public at khwilliamson dot com> on bugs@, thanks!
2. Do not leak newgl when strdup(3) fails in setlocale(3).
3. For setlocale(LC_ALL, "C/C/fr_FR.UTF-8/C/C/C"); correctly set
_GlobalRuneLocale; i found 2. and 3. while looking at the code.
Feedback on a buggy earlier version and OK martijn@.

Reply via email to