Fix possible (not stack) overflow from -d <dir> commandline option.

This commit is contained in:
David Nugent 1997-03-20 03:35:06 +00:00
parent d92630300f
commit dc7eb240ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24059

View File

@ -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;