[Midnightbsd-cvs] src [11472] trunk/usr.bin/mklocale/yacc.y: switch to strlcpy
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jul 7 13:19:01 EDT 2018
Revision: 11472
http://svnweb.midnightbsd.org/src/?rev=11472
Author: laffer1
Date: 2018-07-07 13:19:00 -0400 (Sat, 07 Jul 2018)
Log Message:
-----------
switch to strlcpy
Modified Paths:
--------------
trunk/usr.bin/mklocale/yacc.y
Modified: trunk/usr.bin/mklocale/yacc.y
===================================================================
--- trunk/usr.bin/mklocale/yacc.y 2018-07-07 16:56:45 UTC (rev 11471)
+++ trunk/usr.bin/mklocale/yacc.y 2018-07-07 17:19:00 UTC (rev 11472)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
%{
/*-
* Copyright (c) 1993
@@ -38,7 +39,7 @@
#endif /* not lint */
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/mklocale/yacc.y 300265 2016-05-20 06:02:44Z truckman $");
#include <arpa/inet.h>
@@ -123,7 +124,7 @@
strcmp($2, "BIG5") &&
strcmp($2, "MSKanji"))
warnx("ENCODING %s is not supported by libc", $2);
- strncpy(new_locale.encoding, $2,
+ strlcpy(new_locale.encoding, $2,
sizeof(new_locale.encoding)); }
| VARIABLE
{ new_locale.variable_len = strlen($1) + 1;
More information about the Midnightbsd-cvs
mailing list