Compare commits
10 Commits
485ff9bf2d
...
5f11ed0d08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f11ed0d08 | ||
|
|
0933d2cf2b | ||
|
|
e1a018a4e5 | ||
|
|
07d406d8dc | ||
|
|
9ea388a14a | ||
|
|
74b4098adb | ||
|
|
e30cfde859 | ||
|
|
5862ace903 | ||
|
|
632bfb8beb | ||
|
|
bd280bfb10 |
@ -1,25 +0,0 @@
|
||||
From 2e7931c27eb15e387da440a37f12437e35b22dd4 Mon Sep 17 00:00:00 2001
|
||||
From: Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
Date: Mon, 7 Oct 2019 12:55:58 +1100
|
||||
Subject: [PATCH] libFLAC/bitreader.c: Fix out-of-bounds read
|
||||
|
||||
Credit: Oss-Fuzz
|
||||
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069
|
||||
Testcase: fuzzer_decoder-5670265022840832
|
||||
---
|
||||
src/libFLAC/bitreader.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libFLAC/bitreader.c b/src/libFLAC/bitreader.c
|
||||
index 5e4b59180e..3df4d02c0b 100644
|
||||
--- a/src/libFLAC/bitreader.c
|
||||
+++ b/src/libFLAC/bitreader.c
|
||||
@@ -869,7 +869,7 @@ FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[
|
||||
cwords = br->consumed_words;
|
||||
words = br->words;
|
||||
ucbits = FLAC__BITS_PER_WORD - br->consumed_bits;
|
||||
- b = br->buffer[cwords] << br->consumed_bits;
|
||||
+ b = cwords < br->capacity ? br->buffer[cwords] << br->consumed_bits : 0;
|
||||
} while(cwords >= words && val < end);
|
||||
}
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From bbcef0eb5b501083b197acb7ad84b3bc82fdc8f2 Mon Sep 17 00:00:00 2001
|
||||
From: Neelkamal Semwal <neelkamal.semwal@ittiam.com>
|
||||
Date: Fri, 18 Dec 2020 22:28:36 +0530
|
||||
Subject: [PATCH] libFlac: Exit at EOS in verify mode
|
||||
|
||||
When verify mode is enabled, once decoder flags end of stream, encode processing is considered complete
|
||||
---
|
||||
src/libFLAC/stream_encoder.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c
|
||||
index 4c91247fe8..7109802c27 100644
|
||||
--- a/src/libFLAC/stream_encoder.c
|
||||
+++ b/src/libFLAC/stream_encoder.c
|
||||
@@ -2610,7 +2610,9 @@ FLAC__bool write_bitbuffer_(FLAC__StreamEncoder *encoder, uint32_t samples, FLAC
|
||||
encoder->private_->verify.needs_magic_hack = true;
|
||||
}
|
||||
else {
|
||||
- if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)) {
|
||||
+ if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)
|
||||
+ || (!is_last_block
|
||||
+ && (FLAC__stream_encoder_get_verify_decoder_state(encoder) == FLAC__STREAM_DECODER_END_OF_STREAM))) {
|
||||
FLAC__bitwriter_release_buffer(encoder->private_->frame);
|
||||
FLAC__bitwriter_clear(encoder->private_->frame);
|
||||
if(encoder->protected_->state != FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA)
|
||||
Binary file not shown.
12
flac-1.4.3-sw.patch
Executable file
12
flac-1.4.3-sw.patch
Executable file
@ -0,0 +1,12 @@
|
||||
diff -Nuar flac-1.4.3.org/m4/endian.m4 flac-1.4.3.sw/m4/endian.m4
|
||||
--- flac-1.4.3.org/m4/endian.m4 2022-03-03 02:53:08.140000000 +0000
|
||||
+++ flac-1.4.3.sw/m4/endian.m4 2022-03-03 02:54:44.740000000 +0000
|
||||
@@ -115,7 +115,7 @@
|
||||
# by looking at the target CPU type.
|
||||
[
|
||||
case "$target_cpu" in
|
||||
- alpha* | i?86* | mipsel* | ia64*)
|
||||
+ sw_64* | alpha* | i?86* | mipsel* | ia64*)
|
||||
ac_cv_c_byte_order=little
|
||||
;;
|
||||
|
||||
BIN
flac-1.4.3.tar.xz
Normal file
BIN
flac-1.4.3.tar.xz
Normal file
Binary file not shown.
62
flac.spec
62
flac.spec
@ -1,22 +1,20 @@
|
||||
%define xmms_inputdir %(xmms-config --input-plugin-dir 2>/dev/null || echo %{_libdir}/xmms/General)
|
||||
|
||||
Name: flac
|
||||
Version: 1.3.3
|
||||
Release: 6
|
||||
Version: 1.4.3
|
||||
Release: 2
|
||||
Summary: encoder/decoder which support the Free Lossless Audio Codec
|
||||
License: BSD and GPLv2+ and GFDL
|
||||
License: BSD-3-Clause AND GPL-2.0-or-later AND GFDL-1.1-or-later
|
||||
Source0: http://downloads.xiph.org/releases/flac/flac-%{version}.tar.xz
|
||||
URL: http://www.xiph.org/flac/
|
||||
|
||||
Patch0000: CVE-2021-0561.patch
|
||||
Patch0001: CVE-2020-0499.patch
|
||||
%ifarch sw_64
|
||||
Patch0001: flac-1.4.3-sw.patch
|
||||
%endif
|
||||
|
||||
Provides: %{name}-libs
|
||||
Obsoletes: %{name}-libs
|
||||
|
||||
BuildRequires: gcc-c++ libogg-devel gcc automake autoconf libtool gettext-devel doxygen
|
||||
BuildRequires: xmms-devel desktop-file-utils
|
||||
Source1: xmms-flac.desktop
|
||||
BuildRequires: desktop-file-utils
|
||||
|
||||
%description
|
||||
FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3,
|
||||
@ -30,17 +28,6 @@ Requires: flac
|
||||
%description devel
|
||||
FLAC libraries and header files for development.
|
||||
|
||||
%package -n xmms-flac
|
||||
Summary: XMMS plugin needed to play FLAC files
|
||||
License: GPLv2+
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(postun): desktop-file-utils
|
||||
|
||||
%description -n xmms-flac
|
||||
This package contains an XMMS input plugin to play FLAC audio streams. It also
|
||||
provides symlinks for it to work with Beep Media Player, since plugins between
|
||||
the two players are interchangeable.
|
||||
|
||||
%package help
|
||||
Summary: help package for %{name} with man docs
|
||||
|
||||
@ -53,34 +40,25 @@ document files for %{name}
|
||||
./autogen.sh -V
|
||||
|
||||
export CFLAGS="%{optflags} -funroll-loops"
|
||||
%configure --enable-xmms-plugin --disable-silent-rules --disable-thorough-tests
|
||||
%configure --disable-silent-rules --disable-thorough-tests
|
||||
|
||||
make
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
||||
|
||||
mv %{buildroot}%{_docdir}/flac* ./flac-doc
|
||||
mkdir -p flac-doc-devel
|
||||
mv flac-doc{/api,-devel}
|
||||
rm flac-doc/FLAC.tag %{buildroot}%{_libdir}/*.la \
|
||||
%{buildroot}%{xmms_inputdir}/*.la
|
||||
rm flac-doc/FLAC.tag %{buildroot}%{_libdir}/*.la
|
||||
|
||||
%check
|
||||
#make -C test check FLAC__TEST_LEVEL=0 &> /dev/null
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
%post -n xmms-flac
|
||||
update-desktop-database &> /dev/null || :
|
||||
|
||||
%postun -n xmms-flac
|
||||
update-desktop-database &> /dev/null || :
|
||||
|
||||
%files
|
||||
%doc flac-doc/* AUTHORS COPYING* README
|
||||
%doc flac-doc/* AUTHORS COPYING* README.md
|
||||
%{_bindir}/flac
|
||||
%{_bindir}/metaflac
|
||||
%{_libdir}/*.so.*
|
||||
@ -91,16 +69,26 @@ update-desktop-database &> /dev/null || :
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_datadir}/aclocal/*.m4
|
||||
|
||||
%files -n xmms-flac
|
||||
%license COPYING.GPL
|
||||
%{_datadir}/applications/xmms-flac.desktop
|
||||
%{xmms_inputdir}/libxmms-flac.so
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%doc flac-doc-devel/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 9 2024 chenhaixiang<chenhaixiang3@huawei.com> - 1.4.3-2
|
||||
- fix flac license
|
||||
|
||||
* Tue Feb 6 2024 chenhaixiang<chenhaixiang3@huawei.com> - 1.4.3-1
|
||||
- update to 1.4.3
|
||||
|
||||
* Mon Jan 30 2023 chenhaixiang<chenhaixiang3@huawei.com> - 1.4.2-1
|
||||
- update to 1.4.2
|
||||
|
||||
* Wed Nov 9 2022 chenhaixiang<chenhaixiang3@huawei.com> - 1.3.4-1
|
||||
- update to 1.3.4
|
||||
|
||||
* Wed Oct 19 2022 wuzx<wuzx1226@qq.com> - 1.3.3-7
|
||||
- add sw64 patch
|
||||
|
||||
* Sat May 28 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 1.3.3-6
|
||||
- fix CVE-2020-0499
|
||||
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=XMMS
|
||||
Exec=xmms -p -e %F
|
||||
Icon=xmms
|
||||
MimeType=audio/x-flac;audio/flac;
|
||||
Categories=AudioVideo;Player;
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
Loading…
x
Reference in New Issue
Block a user