Skip to content

Commit 242e005

Browse files
committedFeb 3, 2025·
arecordmidi2: fix unitialization variable error in read_ump_raw()
Variable v should be initialized from the first word in the buffer. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent 7c894ab commit 242e005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎seq/aplaymidi2/arecordmidi2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static int read_ump_raw(FILE *file, uint32_t *buf)
351351

352352
if (fread(buf, 4, 1, file) != 1)
353353
return 0;
354-
v = be32toh(v);
354+
v = be32toh(*buf);
355355
num = snd_ump_packet_length(snd_ump_msg_hdr_type(v));
356356
for (i = 1; i < num; i++) {
357357
if (fread(buf + i, 4, 1, file) != 1)

0 commit comments

Comments
 (0)
Please sign in to comment.