Add uptream commit 915a71a2

915a71a2 ("seq: Fix invalid sanity-check in snd_seq_set_input_buffer_size()")

Resolves: RHEL-13729

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
This commit is contained in:
Jaroslav Kysela 2023-11-30 12:40:57 +01:00
parent e1b2563184
commit 1df5092106
2 changed files with 36 additions and 2 deletions

View File

@ -497,3 +497,37 @@ index c8ac1c82..c53a99fa 100644
--
2.41.0
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 fd8ca30e..5ec737a7 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.41.0

View File

@ -13,7 +13,7 @@
Summary: The Advanced Linux Sound Architecture (ALSA) library
Name: alsa-lib
Version: %{version_alsa_lib}
Release: 1%{?prever_dot}%{?dist}
Release: 2%{?prever_dot}%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.alsa-project.org/
@ -177,7 +177,7 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
%endif
%changelog
* Thu Nov 2 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.10-1
* Thu Nov 30 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.10-2
- update to alsa-lib 1.2.10 and alsa-ucm-conf 1.2.10
* Mon May 15 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.9-1