mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +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;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
case HELPID_DEVICE:
|
case HELPID_DEVICE:
|
||||||
strcpy(card, optarg);
|
strncpy(card, optarg, sizeof(card-1));
|
||||||
|
card[sizeof(card)-1] = '\0';
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
case HELPID_QUIET:
|
case HELPID_QUIET:
|
||||||
|
|
Loading…
Reference in a new issue