1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Use strncpy(3) instead of strcpy(3) to copy optarg into a fixed-sized buffer.

Prompted by:	dd
MFC after:	2 weeks
This commit is contained in:
Maxim Sobolev 2001-10-15 18:21:08 +00:00
parent ae2bac960e
commit be5780f384
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85002
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ main(int argc, char **argv)
break;
case 't':
strcpy(PlayPen, optarg);
strncpy(PlayPen, optarg, sizeof(PlayPen));
break;
case 'X':

View File

@ -147,7 +147,7 @@ main(int argc, char **argv)
break;
case 't':
strcpy(PlayPen, optarg);
strncpy(PlayPen, optarg, sizeof(PlayPen));
break;
case 'x':