Takashi Iwai
b6a2495802
- Backport upstream fixes for sequencer and mixer: 0006-seq-Fix-invalid-sanity-check-in-snd_seq_set_input_bu.patch 0007-mixer-simple-Support-dB-TLVs-for-CTL_SINGLE-controls.patch 0008-seq-Clear-UMP-event-flag-for-legacy-apps.patch 0009-seq-Simplify-snd_seq_extract_output.patch 0010-seq-Check-protocol-compatibility-with-the-current-ve.patch - Clean up spec file OBS-URL: https://build.opensuse.org/request/show/1124030 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=325
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From 915a71a2cdf6361f0fc77fa367a67910dc0288db Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Sat, 4 Nov 2023 10:05:39 +0100
|
|
Subject: [PATCH] seq: Fix invalid sanity-check in
|
|
snd_seq_set_input_buffer_size()
|
|
|
|
snd_seq_set_input_buffer_size() has an assert() call with packet_size,
|
|
but it's still uninitialized at that point. Fix it with the real
|
|
packet size.
|
|
|
|
Fixes: 2aefb5c41cc0 ("seq: Add UMP support")
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/seq/seq.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/seq/seq.c b/src/seq/seq.c
|
|
index fd8ca30e2472..5ec737a7004f 100644
|
|
--- a/src/seq/seq.c
|
|
+++ b/src/seq/seq.c
|
|
@@ -1269,9 +1269,9 @@ int snd_seq_set_input_buffer_size(snd_seq_t *seq, size_t size)
|
|
size_t packet_size;
|
|
|
|
assert(seq && seq->ibuf);
|
|
+ packet_size = get_packet_size(seq);
|
|
assert(size >= packet_size);
|
|
snd_seq_drop_input(seq);
|
|
- packet_size = get_packet_size(seq);
|
|
size = (size + packet_size - 1) / packet_size;
|
|
if (size != seq->ibufsize) {
|
|
char *newbuf;
|
|
--
|
|
2.35.3
|
|
|