Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits: 0e7027dc by Steve Lhomme at 2026-05-13T01:13:40+00:00 contrib: vorbis: use upstream patch to fix missing -lm There has not been a release since 2020. (cherry picked from commit 2b3574cdddb5a60c83b195411bb47f73a134f2d9) - - - - - 3b1d2546 by Tristan Matthews at 2026-05-13T01:13:40+00:00 contrib: vorbis: use upstream patch to fix undefined shift Original patch: https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf Fixes #29810 [oss-fuzz 6222581559787520] (cherry picked from commit 638e26bce1404c216febc411d5b8f0cdeb115f6f) - - - - - 4 changed files: - − contrib/src/vorbis/0001-CMake-add-missing-libm-in-.pc-file-when-it-s-used.patch - + contrib/src/vorbis/0001-Fix-pkgconfig-creation-with-cmake.patch - + contrib/src/vorbis/0002-sharedbook-fix-undefined-shift.patch - contrib/src/vorbis/rules.mak Changes: ===================================== contrib/src/vorbis/0001-CMake-add-missing-libm-in-.pc-file-when-it-s-used.patch deleted ===================================== @@ -1,26 +0,0 @@ -From fac2505acea83d038bbe9e45c4504a6800c46726 Mon Sep 17 00:00:00 2001 -From: Steve Lhomme <[email protected]> -Date: Tue, 9 Jan 2024 09:19:41 +0100 -Subject: [PATCH] CMake: add missing libm in .pc file when it's used - ---- - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 33f684f5..ea79c4aa 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -52,6 +52,9 @@ function(configure_pkg_config_file pkg_config_file_in) - set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - set(VERSION ${PROJECT_VERSION}) -+ if(HAVE_LIBM) -+ set(VORBIS_LIBS "-lm") -+ endif() - string(REPLACE ".in" "" pkg_config_file ${pkg_config_file_in}) - configure_file(${pkg_config_file_in} ${pkg_config_file} @ONLY) - endfunction() --- -2.39.3 (Apple Git-145) - ===================================== contrib/src/vorbis/0001-Fix-pkgconfig-creation-with-cmake.patch ===================================== @@ -0,0 +1,35 @@ +From 3c177d011684fce294edce5ea93f27d3453e6830 Mon Sep 17 00:00:00 2001 +From: Matt Oliver <[email protected]> +Date: Tue, 8 Sep 2020 21:12:54 +1000 +Subject: [PATCH] Fix pkgconfig creation with cmake. + +The cmake build script was not setting a VORBIS_LIBS variable +that is used to update pkg-config files. This results in linking +errors in downstream projects due to missing dependencies +(in this case libm). + +This patch just updates the cmake script to behave the same +as configure does currently. + +Signed-off-by: evpobr <[email protected]> +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bb99e2cf..c42f6a5b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") + # Find math library + + check_library_exists(m floor "" HAVE_LIBM) ++if(HAVE_LIBM) ++ set(VORBIS_LIBS "-lm") ++endif() + + # Find ogg dependency + if(NOT TARGET Ogg::ogg) +-- +2.52.0.windows.1 + ===================================== contrib/src/vorbis/0002-sharedbook-fix-undefined-shift.patch ===================================== @@ -0,0 +1,21 @@ +commit bb4047de4c05712bf1fd49b9584c360b8e4e0adf +Author: Tristan Matthews <[email protected]> +Date: Fri Jun 14 11:39:26 2024 -0400 + + sharedbook: cast to unsigned to avoid undefined shift + + Fixes #2351 + +diff --git a/lib/sharedbook.c b/lib/sharedbook.c +index 444f42b5..7a98b479 100644 +--- a/lib/sharedbook.c ++++ b/lib/sharedbook.c +@@ -422,7 +422,7 @@ int vorbis_book_init_decode(codebook *c,const static_codebook *s){ + long lo=0,hi=0; + + for(i=0;i<tabn;i++){ +- ogg_uint32_t word=i<<(32-c->dec_firsttablen); ++ ogg_uint32_t word=((ogg_uint32_t)i<<(32-c->dec_firsttablen)); + if(c->dec_firsttable[bitreverse(word)]==0){ + while((lo+1)<n && c->codelist[lo+1]<=word)lo++; + while( hi<n && word>=(c->codelist[hi]&mask))hi++; ===================================== contrib/src/vorbis/rules.mak ===================================== @@ -27,7 +27,8 @@ $(TARBALLS)/libvorbis-$(VORBIS_VERSION).tar.xz: libvorbis: libvorbis-$(VORBIS_VERSION).tar.xz .sum-vorbis $(UNPACK) - $(APPLY) $(SRC)/vorbis/0001-CMake-add-missing-libm-in-.pc-file-when-it-s-used.patch + $(APPLY) $(SRC)/vorbis/0001-Fix-pkgconfig-creation-with-cmake.patch + $(APPLY) $(SRC)/vorbis/0002-sharedbook-fix-undefined-shift.patch $(call pkg_static,"vorbis.pc.in") $(call pkg_static,"vorbisenc.pc.in") $(call pkg_static,"vorbisfile.pc.in") View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a5b72d6797a562b30d3ba1efe2adb6a2bc161876...3b1d2546774a740720d09ce7d2e8690e50440086 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a5b72d6797a562b30d3ba1efe2adb6a2bc161876...3b1d2546774a740720d09ce7d2e8690e50440086 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
