mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ALSA: ump: Fix parsing of 0xFx command
The MIDI 1.0 parser retrieved the 0xFx command with a wrong bit shift,
resulting in the bogus type. Fix the bit shift size.
Fixes: 0b5288f5fe
("ALSA: ump: Add legacy raw MIDI support")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/0fbc0b27-54b8-4cda-800e-37e7a03fed39@kili.mountain
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20230525083124.15277-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
ab2335daa6
commit
77700b81bd
@ -454,7 +454,7 @@ static int do_convert_to_ump(struct snd_ump_endpoint *ump,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c & 0x80) {
|
if (c & 0x80) {
|
||||||
bytes = cmd_bytes[(c >> 8) & 7];
|
bytes = cmd_bytes[(c >> 4) & 7];
|
||||||
cvt->buf[0] = c;
|
cvt->buf[0] = c;
|
||||||
cvt->len = 1;
|
cvt->len = 1;
|
||||||
cvt->cmd_bytes = bytes;
|
cvt->cmd_bytes = bytes;
|
||||||
|
Loading…
Reference in New Issue
Block a user