diff options
| author | schwarze <> | 2018-03-29 16:34:25 +0000 |
|---|---|---|
| committer | schwarze <> | 2018-03-29 16:34:25 +0000 |
| commit | 3fe71f438648cc6282b6b7563331849be9671916 (patch) | |
| tree | 561b1a1476449dbe2ac2e2b0dd21d33d3bab9fc7 /src/lib/libc/string/wcspbrk.c | |
| parent | 85b83d75a71cd280d1ffd7aa6bbbbb7154a8ffc4 (diff) | |
| download | openbsd-3fe71f438648cc6282b6b7563331849be9671916.tar.gz openbsd-3fe71f438648cc6282b6b7563331849be9671916.tar.bz2 openbsd-3fe71f438648cc6282b6b7563331849be9671916.zip | |
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@.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
