From 4461a13b06b77590ed67da3c3caf22ecdfa5a2c6 Mon Sep 17 00:00:00 2001 From: sobomax Date: Tue, 16 Oct 2001 03:04:15 +0000 Subject: Fix "off by 1" error introduced in the previous commit by replacing strncpy(3) with strlcpy(3). MFC after: 2 weeks --- usr.sbin/pkg_install/create/main.c | 2 +- usr.sbin/pkg_install/info/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_install') diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index 3c4de03..53c209a 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -109,7 +109,7 @@ main(int argc, char **argv) break; case 't': - strncpy(PlayPen, optarg, sizeof(PlayPen)); + strlcpy(PlayPen, optarg, sizeof(PlayPen)); break; case 'X': diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index d77ff0b..36c4935 100644 --- a/usr.sbin/pkg_install/info/main.c +++ b/usr.sbin/pkg_install/info/main.c @@ -147,7 +147,7 @@ main(int argc, char **argv) break; case 't': - strncpy(PlayPen, optarg, sizeof(PlayPen)); + strlcpy(PlayPen, optarg, sizeof(PlayPen)); break; case 'x': -- cgit v1.1