From dc7eb240eabc14891500e17b008af3cfc674fa12 Mon Sep 17 00:00:00 2001 From: David Nugent Date: Thu, 20 Mar 1997 03:35:06 +0000 Subject: [PATCH] Fix possible (not stack) overflow from -d commandline option. --- usr.sbin/pwd_mkdb/pwd_mkdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;