[vlc-commits] [Git][videolan/vlc][master] contrib: mysofa: upgrade version to fix invalid free when mysofa_open fails

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed May 13 04:33:09 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ebe6e5eb by Lameck Oguta at 2026-05-13T01:15:09+00:00
contrib: mysofa: upgrade version to fix invalid free when mysofa_open fails

- - - - -


4 changed files:

- contrib/src/mysofa/0001-Only-link-with-MATH-library-if-it-s-found.patch
- contrib/src/mysofa/0002-Only-link-with-ZLib-library-if-it-s-found.patch
- contrib/src/mysofa/SHA512SUMS
- contrib/src/mysofa/rules.mak


Changes:

=====================================
contrib/src/mysofa/0001-Only-link-with-MATH-library-if-it-s-found.patch
=====================================
@@ -9,10 +9,10 @@ If it's not found it may not be required (or linking will fail).
  1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index ec4de1d..9c3cd5e 100644
+index f330262..9c8b8ac 100644
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -15,12 +15,9 @@ configure_file (config.h.in ${PROJECT_SOURCE_DIR}/src/config.h)
+@@ -15,12 +15,9 @@ configure_file(config.h.in ${PROJECT_SOURCE_DIR}/src/config.h)
  if(NOT MSVC)
    if(NOT WIN32)
      find_library(MATH m)
@@ -23,9 +23,9 @@ index ec4de1d..9c3cd5e 100644
  else()
 -  set(MATH "")
    find_program(NUGET nuget)
-   if (NUGET)
+   if(NUGET)
      execute_process(COMMAND ${NUGET} install zlib)
-@@ -35,15 +32,12 @@ endif()
+@@ -32,15 +29,12 @@ endif()
  if(NOT MSVC)
    if(NOT WIN32)
      find_library(MATH m)
@@ -34,36 +34,37 @@ index ec4de1d..9c3cd5e 100644
    endif()
    include(FindZLIB)
    include_directories(${ZLIB_INCLUDE_DIRS})
-   SET(PKG_CONFIG_PRIVATELIBS "-lm ${PKG_CONFIG_PRIVATELIBS}")
-   SET(PKG_CONFIG_PRIVATELIBS "-lz ${PKG_CONFIG_PRIVATELIBS}")
+   set(PKG_CONFIG_PRIVATELIBS "-lm ${PKG_CONFIG_PRIVATELIBS}")
+   set(PKG_CONFIG_PRIVATELIBS "-lz ${PKG_CONFIG_PRIVATELIBS}")
  else()
--    set(MATH "")
-     find_program(NUGET nuget)
-     if (NOT NUGET)
-        message(FATAL "Cannot find nuget command line tool.\nInstall it with e.g. choco install nuget.commandline")
-@@ -58,14 +52,20 @@ set(libsrc hrtf/reader.c hdf/superblock.c hdf/dataobject.c hdf/btree.c hdf/fract
-   hrtf/lookup.c hrtf/tools.c hrtf/kdtree.c hrtf/neighbors.c hrtf/interpolate.c hrtf/resample.c hrtf/loudness.c hrtf/minphase.c hrtf/easy.c hrtf/cache.c 
-   resampler/speex_resampler.c)
+-  set(MATH "")
+   find_program(NUGET nuget)
+   if(NOT NUGET)
+     message(
+@@ -77,7 +71,10 @@ set(libsrc
+     resampler/speex_resampler.c)
+ if(BUILD_STATIC_LIBS)
  add_library(mysofa-static STATIC ${libsrc})
--target_link_libraries (mysofa-static ${MATH} ${ZLIB_LIBRARIES})
+-target_link_libraries(mysofa-static LINK_PRIVATE ${MATH} ${ZLIB_LIBRARIES})
 +if(MATH)
-+    target_link_libraries (mysofa-static ${MATH})
++    target_link_libraries(mysofa-static LINK_PRIVATE ${MATH})
 +endif()
-+target_link_libraries (mysofa-static ${ZLIB_LIBRARIES})
- SET_TARGET_PROPERTIES(mysofa-static PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE ON)
- install(TARGETS mysofa-static
-   ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++target_link_libraries(mysofa-static LINK_PRIVATE ${ZLIB_LIBRARIES})
+ set_target_properties(
+   mysofa-static
+   PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE
+@@ -99,7 +96,10 @@ endif()
  
  if(BUILD_SHARED_LIBS)
    add_library(mysofa-shared SHARED ${libsrc})
--  target_link_libraries (mysofa-shared ${MATH} ${ZLIB_LIBRARIES})
+-  target_link_libraries(mysofa-shared PRIVATE ${MATH} ${ZLIB_LIBRARIES})
 +  if(MATH)
-+    target_link_libraries (mysofa-shared ${MATH})
++    target_link_libraries(mysofa-shared PRIVATE ${MATH})
 +  endif()
-+  target_link_libraries (mysofa-shared ${ZLIB_LIBRARIES})
-   SET_TARGET_PROPERTIES(mysofa-shared PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1)
-   set_property(TARGET mysofa-shared PROPERTY VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-   set_property(TARGET mysofa-shared PROPERTY SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR} )
++  target_link_libraries(mysofa-shared PRIVATE ${ZLIB_LIBRARIES})
+   set_target_properties(mysofa-shared
+                         PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1)
+   set_property(
 -- 
-2.52.0.windows.1
+2.43.0
 


=====================================
contrib/src/mysofa/0002-Only-link-with-ZLib-library-if-it-s-found.patch
=====================================
@@ -8,31 +8,31 @@ Subject: [PATCH 2/2] Only link with ZLib library if it's found
  1 file changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9c3cd5e..e8d913b 100644
+index 9c8b8ac..ba45468 100644
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -55,7 +55,9 @@ add_library(mysofa-static STATIC ${libsrc})
+@@ -74,7 +74,9 @@ add_library(mysofa-static STATIC ${libsrc})
  if(MATH)
-     target_link_libraries (mysofa-static ${MATH})
+     target_link_libraries(mysofa-static LINK_PRIVATE ${MATH})
  endif()
--target_link_libraries (mysofa-static ${ZLIB_LIBRARIES})
+-target_link_libraries(mysofa-static LINK_PRIVATE ${ZLIB_LIBRARIES})
 +if(ZLIB_LIBRARIES)
-+    target_link_libraries (mysofa-static ${ZLIB_LIBRARIES})
++    target_link_libraries(mysofa-static LINK_PRIVATE ${ZLIB_LIBRARIES})
 +endif()
- SET_TARGET_PROPERTIES(mysofa-static PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE ON)
- install(TARGETS mysofa-static
-   ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-@@ -65,7 +67,9 @@ if(BUILD_SHARED_LIBS)
+ set_target_properties(
+   mysofa-static
+   PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE
+@@ -99,7 +101,9 @@ if(BUILD_SHARED_LIBS)
    if(MATH)
-     target_link_libraries (mysofa-shared ${MATH})
+     target_link_libraries(mysofa-shared PRIVATE ${MATH})
    endif()
--  target_link_libraries (mysofa-shared ${ZLIB_LIBRARIES})
+-  target_link_libraries(mysofa-shared PRIVATE ${ZLIB_LIBRARIES})
 +  if(ZLIB_LIBRARIES)
-+    target_link_libraries (mysofa-shared ${ZLIB_LIBRARIES})
++    target_link_libraries(mysofa-shared PRIVATE ${ZLIB_LIBRARIES})
 +  endif()
-   SET_TARGET_PROPERTIES(mysofa-shared PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1)
-   set_property(TARGET mysofa-shared PROPERTY VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-   set_property(TARGET mysofa-shared PROPERTY SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR} )
+   set_target_properties(mysofa-shared
+                         PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1)
+   set_property(
 -- 
-2.52.0.windows.1
+2.43.0
 


=====================================
contrib/src/mysofa/SHA512SUMS
=====================================
@@ -1 +1 @@
-2e7455f0aa0dfb21d18a24e66af14ece5e8b672e3d01d5b1305d508ffcea2a282382e27173e1d2d2c59c2838bc0af5312b4003fe6534d5bcb706fb3dad949353  libmysofa-0.8.tar.gz
+2058c94cd09aeeabe40975edd320d7447bd9e535108f32b2a5305c023c7bf89f0c2f44df182390b7e4be8f6ffc9b09c2e35817896bb5e63d3ec9f1bd5b7e972c  libmysofa-1.2.1.tar.gz


=====================================
contrib/src/mysofa/rules.mak
=====================================
@@ -1,6 +1,6 @@
 # Mysofa
 
-MYSOFA_VERSION := 0.8
+MYSOFA_VERSION := 1.2.1
 MYSOFA_URL = $(GITHUB)/hoene/libmysofa/archive/v$(MYSOFA_VERSION).tar.gz
 
 ifeq ($(call need_pkg,"libmysofa"),)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ebe6e5ebf9d0493939dbc37f2a789e33939ded75

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ebe6e5ebf9d0493939dbc37f2a789e33939ded75
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list