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
ae2bac960e
commit
be5780f384
@ -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