22 Jul
2024
22 Jul
'24
7:52 p.m.
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 --- seq/aseqdump/aseqdump.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index 1c968b1cfc05..f717557824ad 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -1086,6 +1086,8 @@ int main(int argc, char *argv[]) break; case 'u': 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); break; case 'r':
--
2.43.0