Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits: 638e26bc by Tristan Matthews at 2026-05-09T04:21:06+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] - - - - - 2 changed files: - + contrib/src/vorbis/0002-sharedbook-fix-undefined-shift.patch - contrib/src/vorbis/rules.mak Changes: ===================================== 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 ===================================== @@ -28,6 +28,7 @@ $(TARBALLS)/libvorbis-$(VORBIS_VERSION).tar.xz: libvorbis: libvorbis-$(VORBIS_VERSION).tar.xz .sum-vorbis $(UNPACK) $(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/-/commit/638e26bce1404c216febc411d5b8f0cdeb115f6f -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/638e26bce1404c216febc411d5b8f0cdeb115f6f 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
