Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mklocale use strlcpy instead of strncpy.



details:   https://anonhg.NetBSD.org/src/rev/452580cb7cbf
branches:  trunk
changeset: 460232:452580cb7cbf
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 13 21:12:32 2019 +0000

description:
use strlcpy instead of strncpy.

diffstat:

 usr.bin/mklocale/yacc.y |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6090161417be -r 452580cb7cbf usr.bin/mklocale/yacc.y
--- a/usr.bin/mklocale/yacc.y   Sun Oct 13 20:55:04 2019 +0000
+++ b/usr.bin/mklocale/yacc.y   Sun Oct 13 21:12:32 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yacc.y,v 1.33 2016/09/03 05:56:59 dholland Exp $       */
+/*     $NetBSD: yacc.y,v 1.34 2019/10/13 21:12:32 christos Exp $       */
 
 %{
 /*-
@@ -43,7 +43,7 @@
 static char sccsid[] = "@(#)yacc.y     8.1 (Berkeley) 6/6/93";
 static char rcsid[] = "$FreeBSD$";
 #else
-__RCSID("$NetBSD: yacc.y,v 1.33 2016/09/03 05:56:59 dholland Exp $");
+__RCSID("$NetBSD: yacc.y,v 1.34 2019/10/13 21:12:32 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -137,7 +137,7 @@
        ;
 
 entry  :       ENCODING STRING
-               { strncpy(new_locale.frl_encoding, $2, sizeof(new_locale.frl_encoding)); }
+               { strlcpy(new_locale.frl_encoding, $2, sizeof(new_locale.frl_encoding)); }
        |       VARIABLE
                { rl_variable_len = strlen($1) + 1;
                  rl_variable = strdup($1);



Home | Main Index | Thread Index | Old Index