Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
5f11ed0d08
!52 [sync] PR-49: fix flac license
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-08-10 03:12:54 +00:00
EulerOSWander
0933d2cf2b fix flac license
(cherry picked from commit 578ee5433b349be47eadb228043fd9b3ef24b640)
2024-08-09 17:15:30 +08:00
openeuler-ci-bot
e1a018a4e5
!48 Update to flac-1.4.3
From: @chenhaixaing 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-02-07 01:09:58 +00:00
chenhaixiang
07d406d8dc Update to flac-1.4.3
Signed-off-by chenhaixiang <chenhaixiang3@huawei.com>
2024-02-06 21:24:53 +08:00
openeuler-ci-bot
9ea388a14a
!40 Update to flac-1.4.2
From: @chenhaixaing 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2023-01-31 08:58:57 +00:00
chenhaixiang
74b4098adb Update to flac-1.4.2
Signed-off-by chenhaixiang <chenhaixiang3@huawei.com>
2023-01-31 10:59:10 +08:00
openeuler-ci-bot
e30cfde859
!39 [sync] PR-38: flac:update 1.3.4
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-11-10 01:53:31 +00:00
chenhaixiang
5862ace903 flac:update to 1.3.4
signed-off-by: chenhaixiang3@huawei.com
(cherry picked from commit 8219410873181ac881bce9c939ca9706f25f45d7)
2022-11-09 22:49:33 +08:00
openeuler-ci-bot
632bfb8beb
!37 [sync] PR-34: 添加sw架构
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-10-19 12:51:53 +00:00
wzx
bd280bfb10 Add sw64 architecture
Signed-off-by: wzx <wuzx1226@qq.com>
(cherry picked from commit df0a35552624287450a91065aa678cf807343245)
2022-10-19 20:47:35 +08:00
7 changed files with 37 additions and 96 deletions

View File

@ -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);
}

View File

@ -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
View 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

Binary file not shown.

View File

@ -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

View File

@ -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