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

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;