From 123c3d73092cbd93248d6cdcbc9a8d7247320857 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Sat, 18 Dec 2021 00:08:56 -0800 Subject: [PATCH 1/2] SDL2: update to 2.0.18 --- ...e2a59c8d41d67c6bc80f25b6e52670dddbbf.patch | 32 ------------------- srcpkgs/SDL2/template | 4 +-- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 srcpkgs/SDL2/patches/ae7ee2a59c8d41d67c6bc80f25b6e52670dddbbf.patch diff --git a/srcpkgs/SDL2/patches/ae7ee2a59c8d41d67c6bc80f25b6e52670dddbbf.patch b/srcpkgs/SDL2/patches/ae7ee2a59c8d41d67c6bc80f25b6e52670dddbbf.patch deleted file mode 100644 index 5c62275830ab..000000000000 --- a/srcpkgs/SDL2/patches/ae7ee2a59c8d41d67c6bc80f25b6e52670dddbbf.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ae7ee2a59c8d41d67c6bc80f25b6e52670dddbbf Mon Sep 17 00:00:00 2001 -From: Ethan Lee -Date: Wed, 11 Aug 2021 09:59:43 -0400 -Subject: [PATCH] wayland: Ignore stateless/sizeless configs when starting in - fullscreen mode - ---- - src/video/wayland/SDL_waylandwindow.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c -index 025dd30ee..451d33b76 100644 ---- a/src/video/wayland/SDL_waylandwindow.c -+++ b/src/video/wayland/SDL_waylandwindow.c -@@ -219,9 +219,15 @@ handle_configure_xdg_toplevel(void *data, - - /* Foolishly do what the compositor says here. If it's wrong, don't - * blame us, we were explicitly instructed to do this. -+ * -+ * UPDATE: Nope, we can't actually do that, the compositor may give -+ * us a completely stateless, sizeless configure, with which we have -+ * to enforce our own state anyway. - */ -- window->w = width; -- window->h = height; -+ if (width != 0 && height != 0) { -+ window->w = width; -+ window->h = height; -+ } - - /* This part is good though. */ - if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { diff --git a/srcpkgs/SDL2/template b/srcpkgs/SDL2/template index 57189b273d3c..68e459178fe1 100644 --- a/srcpkgs/SDL2/template +++ b/srcpkgs/SDL2/template @@ -1,6 +1,6 @@ # Template file for 'SDL2' pkgname=SDL2 -version=2.0.16 +version=2.0.18 revision=1 build_style=gnu-configure configure_args="--enable-alsa --disable-esd --disable-rpath --enable-libudev @@ -15,7 +15,7 @@ license="Zlib" homepage="https://www.libsdl.org/" changelog="https://raw.githubusercontent.com/libsdl-org/SDL/main/WhatsNew.txt" distfiles="https://www.libsdl.org/release/${pkgname}-${version}.tar.gz" -checksum=65be9ff6004034b5b2ce9927b5a4db1814930f169c4b2dae0a1e4697075f287b +checksum=94d40cd73dbfa10bb6eadfbc28f355992bb2d6ef6761ad9d4074eff95ee5711c # Package build options build_options="gles opengl pulseaudio pipewire sndio vulkan wayland x11" From 1c08d8ca284db9b2725d12fe4c0e28a2575ea05a Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Sat, 18 Dec 2021 00:09:14 -0800 Subject: [PATCH 2/2] SDL2_mixer: rebuild for fluidsynth --- .../fix_fluidsynth_use_after_free.patch | 30 +++++++++++++++++++ srcpkgs/SDL2_mixer/template | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/SDL2_mixer/patches/fix_fluidsynth_use_after_free.patch diff --git a/srcpkgs/SDL2_mixer/patches/fix_fluidsynth_use_after_free.patch b/srcpkgs/SDL2_mixer/patches/fix_fluidsynth_use_after_free.patch new file mode 100644 index 000000000000..cd740ac85c11 --- /dev/null +++ b/srcpkgs/SDL2_mixer/patches/fix_fluidsynth_use_after_free.patch @@ -0,0 +1,30 @@ +From 6160668079f91d57a5d7bf0b40ffdd843be70daf Mon Sep 17 00:00:00 2001 +From: Sam Lantinga +Date: Wed, 20 Jan 2021 10:17:10 -0800 +Subject: [PATCH] Fixed use-after-free in music_fluidsynth.c + +Tom M. + +There is a dangerous use-after-free in FLUIDSYNTH_Delete(): the settings object is deleted **before** the synth. Since the settings have been created first to initialize the synth, you must first delete the synth and then delete the settings. This currently crashes all applications that use fluidsynth 2.1.6 and SDL2_mixer. Please apply the attached patch and release a bug fix release. + +Originally reported at https://github.com/FluidSynth/fluidsynth/issues/748 +--- + src/codecs/music_fluidsynth.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/codecs/music_fluidsynth.c b/src/codecs/music_fluidsynth.c +index 8667f0d9..a47247f4 100644 +--- a/music_fluidsynth.c ++++ b/music_fluidsynth.c +@@ -285,9 +285,10 @@ static void FLUIDSYNTH_Stop(void *context) + static void FLUIDSYNTH_Delete(void *context) + { + FLUIDSYNTH_Music *music = (FLUIDSYNTH_Music *)context; ++ fluid_settings_t *settings = fluidsynth.fluid_synth_get_settings(music->synth); + fluidsynth.delete_fluid_player(music->player); +- fluidsynth.delete_fluid_settings(fluidsynth.fluid_synth_get_settings(music->synth)); + fluidsynth.delete_fluid_synth(music->synth); ++ fluidsynth.delete_fluid_settings(settings); + SDL_free(music); + } + diff --git a/srcpkgs/SDL2_mixer/template b/srcpkgs/SDL2_mixer/template index 06a28928419b..a5c0e512ba4e 100644 --- a/srcpkgs/SDL2_mixer/template +++ b/srcpkgs/SDL2_mixer/template @@ -1,7 +1,7 @@ # Template file for 'SDL2_mixer' pkgname=SDL2_mixer version=2.0.4 -revision=3 +revision=4 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="SDL2-devel libvorbis-devel libmikmod-devel libflac-devel