diff options
author | ache <ache@FreeBSD.org> | 2003-12-24 10:16:46 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-12-24 10:16:46 +0000 |
commit | b89dd89c311453f9e09edcef38d2e2a747cdfa95 (patch) | |
tree | 436d0bdcf89b139e2db7e6d30f15d33e1c784090 /lib/libc/locale/setlocale.c | |
parent | d4e4b731a60d06676a0749fde2558c1b9e00baec (diff) | |
download | FreeBSD-src-b89dd89c311453f9e09edcef38d2e2a747cdfa95.zip FreeBSD-src-b89dd89c311453f9e09edcef38d2e2a747cdfa95.tar.gz |
Properly advance "x/y/z" form slash-pointers in some rare cases
PR: 60539
Diffstat (limited to 'lib/libc/locale/setlocale.c')
-rw-r--r-- | lib/libc/locale/setlocale.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index 6829ae5..2e428b3 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -187,11 +187,11 @@ setlocale(category, locale) (void)strlcpy(new_categories[i], locale, len + 1); i++; + while (*r == '/') + r++; locale = r; - while (*locale == '/') - ++locale; - while (*++r && *r != '/') - ; + while (*r && *r != '/') + r++; } while (*locale); while (i < _LC_LAST) { (void)strcpy(new_categories[i], |