Notification time stamped 2020-07-20 09:20:24 UTC
From c4026f5a16c395cab5e8a04df8d6532b732973c1 Mon Sep 17 00:00:00 2001 From: David King amigadave@amigadave.com Date: Jul 16 2020 13:08:21 +0000 Subject: Update to 1.3.7
---
diff --git a/.gitignore b/.gitignore index 609ba42..0388847 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ libvorbis-1.3.1.tar.bz2 /libvorbis-1.3.4.tar.xz /libvorbis-1.3.5.tar.xz /libvorbis-1.3.6.tar.xz +/libvorbis-1.3.7.tar.xz diff --git a/libvorbis-1.3.6-git.patch b/libvorbis-1.3.6-git.patch deleted file mode 100644 index e7714d2..0000000 --- a/libvorbis-1.3.6-git.patch +++ /dev/null @@ -1,215 +0,0 @@ -diff --git a/Brewfile b/Brewfile -new file mode 100644 -index 0000000..af81e5b ---- /dev/null -+++ b/Brewfile -@@ -0,0 +1,3 @@ -+brew 'doxygen' -+brew 'libogg' -+brew 'xz' -diff --git a/Makefile.am b/Makefile.am -index c35131a..3feaf72 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -26,7 +26,7 @@ EXTRA_DIST = \ - vorbisenc-uninstalled.pc.in \ - vorbisfile-uninstalled.pc.in \ - symbian \ -- macosx win32 -+ macosx win32 CMakeLists.txt - - - DISTCHECK_CONFIGURE_FLAGS = --enable-docs -diff --git a/contrib/oss-fuzz/build.sh b/contrib/oss-fuzz/build.sh -new file mode 100755 -index 0000000..29e7f38 ---- /dev/null -+++ b/contrib/oss-fuzz/build.sh -@@ -0,0 +1,23 @@ -+#!/bin/bash -eu -+ -+pushd $SRC -+mv people.xiph.org/*.ogg decode_corpus/ -+zip -r "$OUT/decode_fuzzer_seed_corpus.zip" decode_corpus/ -+popd -+ -+pushd $SRC/ogg -+./autogen.sh -+./configure --prefix="$WORK" --enable-static --disable-shared --disable-crc -+make clean -+make -j$(nproc) -+make install -+popd -+ -+ -+./autogen.sh -+./configure --prefix="$WORK" --enable-static --disable-shared -+make clean -+make -j$(nproc) -+make install -+ -+$CXX $CXXFLAGS $SRC/vorbis/contrib/oss-fuzz/decode_fuzzer.cc -o $OUT/decode_fuzzer -L"$WORK/lib" -I"$WORK/include" -lFuzzingEngine -lvorbisfile -lvorbis -logg -diff --git a/contrib/oss-fuzz/decode_fuzzer.cc b/contrib/oss-fuzz/decode_fuzzer.cc -new file mode 100644 -index 0000000..b8840c1 ---- /dev/null -+++ b/contrib/oss-fuzz/decode_fuzzer.cc -@@ -0,0 +1,48 @@ -+#include <stdio.h> -+#include <string.h> -+#include <cstdint> -+#include <vorbis/vorbisfile.h> -+ -+struct vorbis_data { -+ const uint8_t *current; -+ const uint8_t *data; -+ size_t size; -+}; -+ -+size_t read_func(void *ptr, size_t size1, size_t size2, void *datasource) { -+ vorbis_data* vd = (vorbis_data *)(datasource); -+ size_t len = size1 * size2; -+ if (vd->current + len > vd->data + vd->size) { -+ len = vd->data + vd->size - vd->current; -+ } -+ memcpy(ptr, vd->current, len); -+ vd->current += len; -+ return len; -+} -+ -+ -+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { -+ ov_callbacks memory_callbacks = {0}; -+ memory_callbacks.read_func = read_func; -+ vorbis_data data_st; -+ data_st.size = Size; -+ data_st.current = Data; -+ data_st.data = Data; -+ OggVorbis_File vf; -+ int result = ov_open_callbacks(&data_st, &vf, NULL, 0, memory_callbacks); -+ if (result < 0) { -+ return 0; -+ } -+ int current_section = 0; -+ int eof = 0; -+ char buf[4096]; -+ int read_result; -+ while (!eof) { -+ read_result = ov_read(&vf, buf, sizeof(buf), 0, 2, 1, ¤t_section); -+ if (read_result != OV_HOLE && read_result <= 0) { -+ eof = 1; -+ } -+ } -+ ov_clear(&vf); -+ return 0; -+} -diff --git a/lib/Makefile.am b/lib/Makefile.am -index cd5afdf..e22895e 100644 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -35,7 +35,7 @@ psytune_SOURCES = psytune.c - psytune_LDFLAGS = -static - psytune_LDADD = libvorbis.la - --EXTRA_DIST = lookups.pl -+EXTRA_DIST = lookups.pl CMakeLists.txt - - # build and run the self tests on 'make check' - -diff --git a/lib/info.c b/lib/info.c -index 3fbb7c7..23efa25 100644 ---- a/lib/info.c -+++ b/lib/info.c -@@ -203,6 +203,7 @@ void vorbis_info_clear(vorbis_info *vi){ - - static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ - codec_setup_info *ci=vi->codec_setup; -+ int bs; - if(!ci)return(OV_EFAULT); - - vi->version=oggpack_read(opb,32); -@@ -215,8 +216,12 @@ static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ - vi->bitrate_nominal=(ogg_int32_t)oggpack_read(opb,32); - vi->bitrate_lower=(ogg_int32_t)oggpack_read(opb,32); - -- ci->blocksizes[0]=1<<oggpack_read(opb,4); -- ci->blocksizes[1]=1<<oggpack_read(opb,4); -+ bs = oggpack_read(opb,4); -+ if(bs<0)goto err_out; -+ ci->blocksizes[0]=1<<bs; -+ bs = oggpack_read(opb,4); -+ if(bs<0)goto err_out; -+ ci->blocksizes[1]=1<<bs; - - if(vi->rate<1)goto err_out; - if(vi->channels<1)goto err_out; -diff --git a/lib/os.h b/lib/os.h -index 416a401..e098926 100644 ---- a/lib/os.h -+++ b/lib/os.h -@@ -120,7 +120,7 @@ static inline int vorbis_ftoi(double f){ /* yes, double! Otherwise, - /* MSVC inline assembly. 32 bit only; inline ASM isn't implemented in the - * 64 bit compiler and doesn't work on arm. */ - #if defined(_MSC_VER) && !defined(_WIN64) && \ -- !defined(_WIN32_WCE) && !defined(_M_ARM) -+ !defined(_WIN32_WCE) && !defined(_M_ARM) && !defined(_M_ARM64) - # define VORBIS_FPU_CONTROL - - typedef ogg_int16_t vorbis_fpu_control; -diff --git a/lib/psy.c b/lib/psy.c -index 422c6f1..1310123 100644 ---- a/lib/psy.c -+++ b/lib/psy.c -@@ -602,8 +602,9 @@ static void bark_noise_hybridmp(int n,const long *b, - for (i = 0, x = 0.f;; i++, x += 1.f) { - - lo = b[i] >> 16; -- if( lo>=0 ) break; - hi = b[i] & 0xffff; -+ if( lo>=0 ) break; -+ if( hi>=n ) break; - - tN = N[hi] + N[-lo]; - tX = X[hi] - X[-lo]; -diff --git a/lib/sharedbook.c b/lib/sharedbook.c -index 4545d4f..8d73daa 100644 ---- a/lib/sharedbook.c -+++ b/lib/sharedbook.c -@@ -62,7 +62,15 @@ float _float32_unpack(long val){ - int sign=val&0x80000000; - long exp =(val&0x7fe00000L)>>VQ_FMAN; - if(sign)mant= -mant; -- return(ldexp(mant,exp-(VQ_FMAN-1)-VQ_FEXP_BIAS)); -+ exp=exp-(VQ_FMAN-1)-VQ_FEXP_BIAS; -+ /* clamp excessive exponent values */ -+ if (exp>63){ -+ exp=63; -+ } -+ if (exp<-63){ -+ exp-63; -+ } -+ return(ldexp(mant,exp)); - } - - /* given a list of word lengths, generate a list of codewords. Works -diff --git a/lib/vorbisenc.c b/lib/vorbisenc.c -index 4a4607c..64a51b5 100644 ---- a/lib/vorbisenc.c -+++ b/lib/vorbisenc.c -@@ -684,6 +684,7 @@ int vorbis_encode_setup_init(vorbis_info *vi){ - highlevel_encode_setup *hi=&ci->hi; - - if(ci==NULL)return(OV_EINVAL); -+ if(vi->channels<1||vi->channels>255)return(OV_EINVAL); - if(!hi->impulse_block_p)i0=1; - - /* too low/high an ATH floater is nonsensical, but doesn't break anything */ -@@ -1210,7 +1211,7 @@ int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){ - hi->req, - hi->managed, - &new_base); -- if(!hi->setup)return OV_EIMPL; -+ if(!new_template)return OV_EIMPL; - hi->setup=new_template; - hi->base_setting=new_base; - vorbis_encode_setup_setting(vi,vi->channels,vi->rate); diff --git a/libvorbis.spec b/libvorbis.spec index 32f2f91..b65c2b7 100644 --- a/libvorbis.spec +++ b/libvorbis.spec @@ -2,8 +2,8 @@
Summary: The Vorbis General Audio Compression Codec Name: libvorbis -Version: 1.3.6 -Release: 6%{?dist} +Version: 1.3.7 +Release: 1%{?dist} Epoch: 1 License: BSD URL: https://www.xiph.org/ @@ -11,20 +11,6 @@ Source: https://downloads.xiph.org/releases/vorbis/%%7Bname%7D-%%7Bversion%7D.tar.xz BuildRequires: gcc BuildRequires: pkgconfig(ogg) >= 1.0
-# sync with git as of -# -# commit 46e70fa6573e206c2555cd99a53204ffd6bf58fd -# Author: Minmin Gong gongminmin@msn.com -# Date: Wed Jul 4 21:37:54 2018 -0700 -# -# Fix the compiling errors on msvc ARM64 configuration. -# -# Fixes: -# CVE-2017-14160 -# CVE-2018-10392 -# CVE-2018-10393 -Patch0: libvorbis-1.3.6-git.patch - %description Ogg Vorbis is a fully open, non-proprietary, patent- and royalty-free, general-purpose compressed audio format for audio and music at fixed @@ -52,8 +38,6 @@ Documentation for developing applications with libvorbis. %prep
%setup -q -%patch0 -p1 -sed -i "s|-O20|$RPM_OPT_FLAGS|" configure sed -i "s/-ffast-math//" configure sed -i "s/-mcpu=750//" configure
@@ -91,6 +75,9 @@ make check %ldconfig_scriptlets
%changelog +* Thu Jul 16 2020 David King amigadave@amigadave.com - 1.3.7-1 +- Update to 1.3.7 + * Wed Jan 29 2020 Fedora Release Engineering releng@fedoraproject.org - 1:1.3.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources index 19bc4fd..a880a73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvorbis-1.3.6.tar.xz) = a5d990bb88db2501b16f8eaee9f2ecb599cefd7dab2134d16538d8905263a972157c7671867848c2a8a358bf5e5dbc7721205ece001032482f168be7bda4f132 +SHA512 (libvorbis-1.3.7.tar.xz) = bbf5f11f623d959b3ba98d6b52806521b0b918b59b867f0658c153ea1013293364eead4987e9e71f8798021379310860a2e548fcf89d10caf23d45e41aba45cd
https://src.fedoraproject.org/rpms/libvorbis/c/c4026f5a16c395cab5e8a04df8d65...
scm-commits@lists.fedoraproject.org