mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
sdl2_mixer: updated to 2.8.0 and patch removed (#11388)
* sdl2_mixer: remove patch The issue has been fixed, the patch is no longer needed. https://github.com/FluidSynth/fluidsynth/issues/748 https://hg.libsdl.org/SDL_mixer/rev/b0afe341a91d * removed libmodplug, no longer needed. sdl2_mixer uses libxmp by default, no need for libmodplug anymore
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
From 6160668079f91d57a5d7bf0b40ffdd843be70daf Mon Sep 17 00:00:00 2001
|
||||
From: Sam Lantinga <slouken@libsdl.org>
|
||||
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
|
||||
|
||||
diff --git a/music_fluidsynth.c b/music_fluidsynth.c
|
||||
index f5346a4..e72e2ca 100644
|
||||
--- a/music_fluidsynth.c
|
||||
+++ b/music_fluidsynth.c
|
||||
@@ -273,9 +273,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);
|
||||
}
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -7,35 +7,34 @@ Ogg Vorbis, and SMPEG MP3 libraries."
|
||||
HOMEPAGE="https://www.libsdl.org/projects/SDL_mixer/"
|
||||
COPYRIGHT="1997-2012 Sam Lantinga"
|
||||
LICENSE="Zlib"
|
||||
REVISION="5"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419"
|
||||
CHECKSUM_SHA256="1cfb34c87b26dbdbc7afd68c4f545c0116ab5f90bbfecc5aebe2a9cb4bb31549"
|
||||
SOURCE_DIR="SDL2_mixer-$portVersion"
|
||||
PATCHES="sdl2_mixer-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
sdl2_mixer$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
lib:libSDL2_mixer_2.0$secondaryArchSuffix = 0.2.2 compat >= 0
|
||||
lib:libSDL2_mixer_2.0$secondaryArchSuffix = 0.800.0 compat >= 0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libflac$secondaryArchSuffix
|
||||
lib:libfluidsynth$secondaryArchSuffix >= 2
|
||||
lib:libmad$secondaryArchSuffix
|
||||
lib:libmodplug$secondaryArchSuffix
|
||||
lib:libmpg123$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libxmp$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
sdl2_mixer${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
|
||||
devel:libSDL2_mixer$secondaryArchSuffix = 0.2.2 compat >= 0
|
||||
devel:libSDL2_mixer_2.0$secondaryArchSuffix = 0.2.2 compat >= 0
|
||||
devel:libSDL2_mixer$secondaryArchSuffix = 0.800.0 compat >= 0
|
||||
devel:libSDL2_mixer_2.0$secondaryArchSuffix = 0.800.0 compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
sdl2_mixer$secondaryArchSuffix == $portVersion base
|
||||
@@ -46,11 +45,11 @@ BUILD_REQUIRES="
|
||||
devel:libflac$secondaryArchSuffix
|
||||
devel:libfluidsynth$secondaryArchSuffix >= 2
|
||||
devel:libmad$secondaryArchSuffix
|
||||
devel:libmodplug$secondaryArchSuffix
|
||||
devel:libmpg123$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libxmp$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
Reference in New Issue
Block a user