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:
parent
5d13f1960f
commit
8d45c05687
@ -109,7 +109,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 't':
|
||||
strcpy(PlayPen, optarg);
|
||||
strncpy(PlayPen, optarg, sizeof(PlayPen));
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
|
@ -147,7 +147,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 't':
|
||||
strcpy(PlayPen, optarg);
|
||||
strncpy(PlayPen, optarg, sizeof(PlayPen));
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
|
Loading…
Reference in New Issue
Block a user