1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Add comment that range checking is already done at upper level

Kill snprintf left in collate.c from previous backout

Should go in 2.2
This commit is contained in:
Andrey A. Chernov 1996-12-28 05:04:24 +00:00
parent 942c84aabd
commit af155bdff3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20961
3 changed files with 9 additions and 4 deletions

View File

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: collate.c,v 1.9 1996/11/26 02:49:31 ache Exp $
* $Id: collate.c,v 1.10 1996/12/16 17:32:56 joerg Exp $
*/
#include <rune.h>
@ -73,8 +73,11 @@ __collate_load_tables(encoding)
__collate_load_error = save_load_error;
return -1;
}
(void) snprintf(buf, sizeof buf, "%s/%s/LC_COLLATE",
_PathLocale, encoding);
/* Range checking already done at upper level caller */
(void) strcpy(buf, _PathLocale);
(void) strcat(buf, "/");
(void) strcat(buf, encoding);
(void) strcat(buf, "/LC_COLLATE");
if ((fp = fopen(buf, "r")) == NULL) {
__collate_load_error = save_load_error;
return -1;

View File

@ -85,6 +85,7 @@ _xpg4_setrunelocale(encoding)
if (!_PathLocale)
return(EFAULT);
/* Range checking already done at upper level caller */
(void) strcpy(name, _PathLocale);
(void) strcat(name, "/");
(void) strcat(name, encoding);

View File

@ -17,7 +17,7 @@
#ifdef LIBC_RCS
static const char rcsid[] =
"$Id: strftime.c,v 1.11 1996/07/19 15:17:44 wollman Exp $";
"$Id: strftime.c,v 1.12 1996/11/26 02:52:52 ache Exp $";
#endif
#ifndef lint
@ -509,6 +509,7 @@ __time_load_locale(const char *name)
if (!_PathLocale)
goto no_locale;
/* Range checking already done at upper level caller */
strcpy(filename, _PathLocale);
strcat(filename, "/");
strcat(filename, name);