diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index eec546c97c9c..880447117449 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -116,7 +116,7 @@ main(argc, argv) cflag = 1; break; case 'd': - strcpy(prefix, optarg); + strncpy(prefix, optarg, sizeof prefix - 1); break; case 'p': /* create V7 "file.orig" */ makeold = 1;