Module Name: src Committed By: christos Date: Sun Oct 13 21:12:33 UTC 2019
Modified Files: src/usr.bin/mklocale: yacc.y Log Message: use strlcpy instead of strncpy. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.bin/mklocale/yacc.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/mklocale/yacc.y diff -u src/usr.bin/mklocale/yacc.y:1.33 src/usr.bin/mklocale/yacc.y:1.34 --- src/usr.bin/mklocale/yacc.y:1.33 Sat Sep 3 01:56:59 2016 +++ src/usr.bin/mklocale/yacc.y Sun Oct 13 17:12:32 2019 @@ -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 @@ table : entry ; 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);