Update the comment why range checking not needed
Fix setrunelocale fail if called directly without prior setlocale call Should go in 2.2
This commit is contained in:
parent
7984321584
commit
9c54f31be5
@ -73,7 +73,7 @@ __collate_load_tables(encoding)
|
||||
__collate_load_error = save_load_error;
|
||||
return -1;
|
||||
}
|
||||
/* Range checking already done at upper level caller */
|
||||
/* Range checking not needed, encoding has fixed size */
|
||||
(void) strcpy(buf, _PathLocale);
|
||||
(void) strcat(buf, "/");
|
||||
(void) strcat(buf, encoding);
|
||||
|
@ -302,7 +302,7 @@ const char *encoding;
|
||||
return(0);
|
||||
if (!_PathLocale)
|
||||
return(1);
|
||||
/* Range checking already done at upper level caller */
|
||||
/* Range checking not needed, encoding has fixed size */
|
||||
strcpy(name, _PathLocale);
|
||||
strcat(name, "/");
|
||||
strcat(name, encoding);
|
||||
|
@ -84,8 +84,8 @@ _xpg4_setrunelocale(encoding)
|
||||
}
|
||||
|
||||
if (!_PathLocale)
|
||||
return(EFAULT);
|
||||
/* Range checking already done at upper level caller */
|
||||
_PathLocale = _PATH_LOCALE;
|
||||
/* Range checking not needed, encoding has fixed size */
|
||||
(void) strcpy(name, _PathLocale);
|
||||
(void) strcat(name, "/");
|
||||
(void) strcat(name, encoding);
|
||||
|
Loading…
Reference in New Issue
Block a user