Skip to content

Commit

Permalink
aseqdump: Correct the limit of UMP 7-bit SysEx bytes
Browse files Browse the repository at this point in the history
UMP 7-bit SysEx can hold up to 6 bytes, not 14 bytes.

Fixes: 02b0c3a ("aseqdump: Avoid OOB access with broken SysEx UMP packets")
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jul 26, 2024
1 parent 02b0c3a commit 0188f93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seq/aseqdump/aseqdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ static void dump_ump_sysex_event(const unsigned int *ump)
dump_ump_sysex_status("SysEx", snd_ump_sysex_msg_status(ump));
length = snd_ump_sysex_msg_length(ump);
printf(" length %d ", length);
if (length > 14)
length = 14;
if (length > 6)
length = 6;
for (i = 0; i < length; i++)
printf("%s%02x", i ? ":" : "", ump_sysex7_data(ump, i));
printf("\n");
Expand Down

0 comments on commit 0188f93

Please sign in to comment.