!6 [sync] PR-5: Upgrade to 2.2.7

From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2022-10-17 07:23:24 +00:00 committed by Gitee
commit 1a39d2db3b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 9 additions and 256 deletions

View File

@ -1,94 +0,0 @@
From 67596a87731dc593551975ca0268a438ab7410a2 Mon Sep 17 00:00:00 2001
From: derselbst <tom.mbrt@googlemail.com>
Date: Sun, 14 Mar 2021 10:58:13 +0100
Subject: [PATCH] Invalid generator were not removed from list
fluid_list_remove() should receive the beginning of a list, so it can
adjust the predecessor of the ele
ment to be removed. Otherwise the element would remain in the list,
which in this case led to a use-aft
er-free afterwards.
---
src/sfloader/fluid_defsfont.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c
index 0330de5..fc68d34 100644
--- a/src/sfloader/fluid_defsfont.c
+++ b/src/sfloader/fluid_defsfont.c
@@ -2706,7 +2706,7 @@ load_pmod (int size, SFData * sf, FILE * fd)
static int
load_pgen (int size, SFData * sf, FILE * fd)
{
- fluid_list_t *p, *p2, *p3, *dup, **hz = NULL;
+ fluid_list_t *p, *p2, *p3, *dup, **hz = NULL, *start_of_zone_list;
SFZone *z;
SFGen *g;
SFGenAmount genval;
@@ -2718,7 +2718,7 @@ load_pgen (int size, SFData * sf, FILE * fd)
{ /* traverse through all presets */
gzone = FALSE;
discarded = FALSE;
- p2 = ((SFPreset *) (p->data))->zone;
+ start_of_zone_list = p2 = ((SFPreset *) (p->data))->zone;
if (p2)
hz = &p2;
while (p2)
@@ -2828,12 +2828,14 @@ load_pgen (int size, SFData * sf, FILE * fd)
}
}
else
- { /* previous global zone exists, discard */
+ {
+ SFZone * pzone = fluid_list_get(p2);
+ /* previous global zone exists, discard */
FLUID_LOG (FLUID_WARN,
_("Preset \"%s\": Discarding invalid global zone"),
((SFPreset *) (p->data))->name);
- *hz = fluid_list_remove(*hz, p2->data);
- sfont_free_zone((SFZone *)fluid_list_get(p2));
+ *hz = fluid_list_remove(start_of_zone_list, pzone);
+ sfont_free_zone(pzone);
}
}
@@ -3058,7 +3060,7 @@ load_imod (int size, SFData * sf, FILE * fd)
static int
load_igen (int size, SFData * sf, FILE * fd)
{
- fluid_list_t *p, *p2, *p3, *dup, **hz = NULL;
+ fluid_list_t *p, *p2, *p3, *dup, **hz = NULL, *start_of_zone_list;
SFZone *z;
SFGen *g;
SFGenAmount genval;
@@ -3070,7 +3072,7 @@ load_igen (int size, SFData * sf, FILE * fd)
{ /* traverse through all instruments */
gzone = FALSE;
discarded = FALSE;
- p2 = ((SFInst *) (p->data))->zone;
+ start_of_zone_list = p2 = ((SFInst *) (p->data))->zone;
if (p2)
hz = &p2;
while (p2)
@@ -3179,12 +3181,14 @@ load_igen (int size, SFData * sf, FILE * fd)
}
}
else
- { /* previous global zone exists, discard */
+ {
+ SFZone * izone = fluid_list_get(p2);
+ /* previous global zone exists, discard */
FLUID_LOG (FLUID_WARN,
_("Instrument \"%s\": Discarding invalid global zone"),
((SFInst *) (p->data))->name);
- *hz = fluid_list_remove(*hz, p2->data);
- sfont_free_zone((SFZone *)fluid_list_get(p2));
+ *hz = fluid_list_remove(start_of_zone_list, izone);
+ sfont_free_zone(izone);
}
}
--
2.23.0

View File

@ -1,52 +0,0 @@
From 6673a5f73c0484f8462b4b33860d2b1c68c24684 Mon Sep 17 00:00:00 2001
From: Tom M <tom.mbrt@googlemail.com>
Date: Sun, 14 Mar 2021 20:23:38 +0100
Subject: [PATCH] Update fluid_sffile.c
---
src/sfloader/fluid_defsfont.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c
index fc68d34..9663a40 100644
--- a/src/sfloader/fluid_defsfont.c
+++ b/src/sfloader/fluid_defsfont.c
@@ -2829,13 +2829,14 @@ load_pgen (int size, SFData * sf, FILE * fd)
}
else
{
- SFZone * pzone = fluid_list_get(p2);
+ p2 = fluid_list_next(p2); /* advance to next zone before deleting the current list element */
/* previous global zone exists, discard */
FLUID_LOG (FLUID_WARN,
_("Preset \"%s\": Discarding invalid global zone"),
((SFPreset *) (p->data))->name);
- *hz = fluid_list_remove(start_of_zone_list, pzone);
- sfont_free_zone(pzone);
+ fluid_list_remove(start_of_zone_list, z);
+ sfont_free_zone(z);
+ continue;
}
}
@@ -3182,13 +3183,14 @@ load_igen (int size, SFData * sf, FILE * fd)
}
else
{
- SFZone * izone = fluid_list_get(p2);
+ p2 = fluid_list_next(p2); /* advance to next zone before deleting the current list element */
/* previous global zone exists, discard */
FLUID_LOG (FLUID_WARN,
_("Instrument \"%s\": Discarding invalid global zone"),
((SFInst *) (p->data))->name);
- *hz = fluid_list_remove(start_of_zone_list, izone);
- sfont_free_zone(izone);
+ fluid_list_remove(start_of_zone_list, z);
+ sfont_free_zone(z);
+ continue;
}
}
--
2.23.0

View File

@ -1,66 +0,0 @@
From f83c49d6fa7f1ec4818cb9e920e30adc827d28bf Mon Sep 17 00:00:00 2001
From: Marcus Weseloh <marcus@weseloh.cc>
Date: Wed, 4 Apr 2018 11:03:47 +0200
Subject: [PATCH] Remove sfont_zone_delete, replace with direct
invocations instead
---
src/sfloader/fluid_defsfont.c | 14 ++++----------
src/sfloader/fluid_defsfont.h | 2 --
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c
index 231d248..0330de5 100644
--- a/src/sfloader/fluid_defsfont.c
+++ b/src/sfloader/fluid_defsfont.c
@@ -2832,7 +2832,8 @@ load_pgen (int size, SFData * sf, FILE * fd)
FLUID_LOG (FLUID_WARN,
_("Preset \"%s\": Discarding invalid global zone"),
((SFPreset *) (p->data))->name);
- sfont_zone_delete (sf, hz, (SFZone *) (p2->data));
+ *hz = fluid_list_remove(*hz, p2->data);
+ sfont_free_zone((SFZone *)fluid_list_get(p2));
}
}
@@ -3182,7 +3183,8 @@ load_igen (int size, SFData * sf, FILE * fd)
FLUID_LOG (FLUID_WARN,
_("Instrument \"%s\": Discarding invalid global zone"),
((SFInst *) (p->data))->name);
- sfont_zone_delete (sf, hz, (SFZone *) (p2->data));
+ *hz = fluid_list_remove(*hz, p2->data);
+ sfont_free_zone((SFZone *)fluid_list_get(p2));
}
}
@@ -3566,14 +3568,6 @@ sfont_preset_compare_func (void* a, void* b)
return (aval - bval);
}
-/* delete zone from zone list */
-void
-sfont_zone_delete (SFData * sf, fluid_list_t ** zlist, SFZone * zone)
-{
- *zlist = fluid_list_remove (*zlist, (void*) zone);
- sfont_free_zone (zone);
-}
-
/* Find generator in gen list */
fluid_list_t *
gen_inlist (int gen, fluid_list_t * genlist)
diff --git a/src/sfloader/fluid_defsfont.h b/src/sfloader/fluid_defsfont.h
index 0d5c6c0..d1ceac1 100644
--- a/src/sfloader/fluid_defsfont.h
+++ b/src/sfloader/fluid_defsfont.h
@@ -222,8 +222,6 @@ void sfont_close (SFData * sf);
void sfont_free_zone (SFZone * zone);
int sfont_preset_compare_func (void* a, void* b);
-void sfont_zone_delete (SFData * sf, fluid_list_t ** zlist, SFZone * zone);
-
fluid_list_t *gen_inlist (int gen, fluid_list_t * genlist);
int gen_valid (int gen);
int gen_validp (int gen);
--
2.23.0

Binary file not shown.

BIN
fluidsynth-2.2.7.tar.gz Normal file

Binary file not shown.

View File

@ -1,34 +0,0 @@
diff -rupN fluidsynth-1.1.9.org/doc/Doxyfile fluidsynth-1.1.9/doc/Doxyfile
--- fluidsynth-1.1.9.org/doc/Doxyfile 2018-01-02 10:14:56.000000000 -0500
+++ fluidsynth-1.1.9/doc/Doxyfile 2018-01-06 18:01:17.505234645 -0500
@@ -121,7 +121,7 @@ GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
-HTML_FOOTER =
+HTML_FOOTER = no_date_footer.html
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
diff -rupN fluidsynth-1.1.9.org/doc/Doxyfile.cmake fluidsynth-1.1.9/doc/Doxyfile.cmake
--- fluidsynth-1.1.9.org/doc/Doxyfile.cmake 2018-01-02 10:14:56.000000000 -0500
+++ fluidsynth-1.1.9/doc/Doxyfile.cmake 2018-01-06 18:01:54.625555496 -0500
@@ -121,7 +121,7 @@ GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
-HTML_FOOTER =
+HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/no_date_footer.html
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
diff -rupN fluidsynth-1.1.9.org/doc/no_date_footer.html fluidsynth-1.1.9/doc/no_date_footer.html
--- fluidsynth-1.1.9.org/doc/no_date_footer.html 1969-12-31 19:00:00.000000000 -0500
+++ fluidsynth-1.1.9/doc/no_date_footer.html 2018-01-06 18:02:46.340762582 -0500
@@ -0,0 +1,6 @@
+<hr size="1"><address style="text-align: right;"><small>
+Generated for $projectname by <a href="http://www.doxygen.org/
+index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
+$doxygenversion</small></address>
+</body>
+</html>

View File

@ -1,18 +1,14 @@
Name: fluidsynth
Version: 1.1.11
Release: 4
Version: 2.2.7
Release: 1
Summary: Real-time software synthesizer
License: LGPLv2+
URL: http://www.fluidsynth.org/
Source0: https://github.com/Fluidsynth/fluidsynth/archive/v%{version}/fluidsynth-%{version}.tar.gz
Patch0000: fluidsynth-no_date_footer.patch
Patch0001: CVE-2021-21417-pre.patch
Patch0002: CVE-2021-21417-1.patch
Patch0003: CVE-2021-21417-2.patch
BuildRequires: alsa-lib-devel cmake dbus-devel gcc jack-audio-connection-kit-devel readline-devel
BuildRequires: ladspa-devel ncurses-devel libsndfile-devel pkgconfig pulseaudio-libs-devel doxygen
BuildRequires: g++ make
Provides: fluidsynth-libs = %{version}-%{release}
Obsoletes: fluidsynth-libs < %{version}-%{release}
@ -52,10 +48,10 @@ make doxygen -C %{_target_platform}/doc
%files
%{_bindir}/fluid*
%doc AUTHORS LICENSE
%{_libdir}/libfluidsynth.so.1*
%{_libdir}/libfluidsynth.so.3*
%files devel
%doc %{_target_platform}/doc/api/html doc/*.c doc/*fluid*.txt doc/*.odt ChangeLog
%doc %{_target_platform}/doc/api/html doc/*fluid*.txt doc/*.odt ChangeLog
%{_includedir}/fluidsynth.h
%{_includedir}/fluidsynth/
%{_libdir}/libfluidsynth.so
@ -63,9 +59,12 @@ make doxygen -C %{_target_platform}/doc
%files help
%{_mandir}/man1/fluidsynth*
%doc NEWS README.md THANKS TODO doc/FluidSynth-LADSPA.pdf
%doc README.md THANKS TODO
%changelog
* Wed Jun 15 2022 wulei <wulei80@h-partners.com> - 2.2.7-1
- Upgrade to 2.2.7
* Thu May 13 2021 wangxiao <wangxiao65@huawei.com> - 1.1.11-4
- Fix CVE-2021-21417