mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:35:42 +01:00
aseqdump: Check the -u option value properly
Instead of passing the value as is, check the value passed to -u option and bail out for bad values. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
946ea467cf
commit
397c198955
1 changed files with 2 additions and 0 deletions
|
@ -1086,6 +1086,8 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
ump_version = atoi(optarg);
|
ump_version = atoi(optarg);
|
||||||
|
if (ump_version < 0 || ump_version > 2)
|
||||||
|
fatal("Invalid UMP version %d", ump_version);
|
||||||
snd_seq_set_client_midi_version(seq, ump_version);
|
snd_seq_set_client_midi_version(seq, ump_version);
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
|
Loading…
Reference in a new issue