Sligtly modify previous out-of-bounds fix: just break instead of
return(NULL) for upward compatibility with more LC_* categories may be implemented in future.
This commit is contained in:
parent
5fc5c0cd3b
commit
4e7b46d8e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101223
@ -149,7 +149,7 @@ setlocale(category, locale)
|
||||
return (NULL); /* Hmm, just slashes... */
|
||||
do {
|
||||
if (i == _LC_LAST)
|
||||
return(NULL); /* Too many slashes... */
|
||||
break; /* Too many slashes... */
|
||||
len = r - locale > ENCODING_LEN ? ENCODING_LEN : r - locale;
|
||||
(void)strlcpy(new_categories[i], locale, len + 1);
|
||||
i++;
|
||||
|
Loading…
Reference in New Issue
Block a user