mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 02:55:42 +01:00
Fixed possible buffer overrun
This commit is contained in:
parent
d6e0630ab2
commit
3d3fbd78e8
1 changed files with 2 additions and 1 deletions
|
@ -1486,7 +1486,8 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
case 'D':
|
||||
case HELPID_DEVICE:
|
||||
strcpy(card, optarg);
|
||||
strncpy(card, optarg, sizeof(card-1));
|
||||
card[sizeof(card)-1] = '\0';
|
||||
break;
|
||||
case 'q':
|
||||
case HELPID_QUIET:
|
||||
|
|
Loading…
Reference in a new issue