Compare commits

...
Sign in to create a new pull request.

38 commits

Author SHA1 Message Date
Fedora Release Engineering
dbbec6b403 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:42:07 +00:00
Peter Lemenkov
1c66986800 Forgot to upload sources
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2026-02-22 19:31:05 +01:00
Peter Lemenkov
3db12b9d47 Update wavpack to 5.9.0 (#2430665)
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2026-02-22 18:57:50 +01:00
Fedora Release Engineering
10f340c06c Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 20:07:50 +00:00
Fedora Release Engineering
635dce8db3 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 20:18:10 +00:00
psklenar@redhat.com
a04832ab08 fedora CI plans move to gitlab for centos-stream test space https://issues.redhat.com/browse/RHELMISC-13073 2025-06-09 17:03:30 +02:00
Sérgio M. Basto
4e1fa1131e Update wavpack to 5.8.1 (#2338095) 2025-02-10 16:34:44 +00:00
Fedora Release Engineering
41ac63fc22 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 14:46:59 +00:00
Peter Lemenkov
1bbb260634 Remove CMake requirement for C++ compiler
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-10-25 19:43:42 +03:00
Peter Lemenkov
e442bdb1c0 Merge mingw32/64 package
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-10-22 23:35:14 +03:00
Peter Lemenkov
d32b0f677f Use common description block (prepare for Mingw merge)
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-10-22 22:25:01 +03:00
Peter Lemenkov
9fdeec18a1 Switch to cmake
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-10-22 22:25:01 +03:00
Peter Lemenkov
1826ea6415 No need to specify this dep
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-10-22 22:25:01 +03:00
Peter Lemenkov
f89d02dd54 Cosmetic cleanups
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-10-22 19:54:22 +03:00
Peter Lemenkov
e669d92e91 Convert to %autorelease and %autochangelog
[skip changelog]
2024-10-22 17:07:07 +03:00
Tomas Korbar
f79c405956 Disable asm code parts
ASM code parts break support for cf-protection on x86_64,
since they do not contain such feature. This situation is
likely to repeat in the future and thus all code parts
should be compiled by compiler which knows distribution
settings.
2024-07-29 13:19:20 +02:00
Fedora Release Engineering
f0a60c0c04 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 09:08:51 +00:00
Tomas Korbar
6da0e2f7c4 Rebase to 5.7.0
Resolves: rhbz#2267425
2024-03-13 12:47:53 +01:00
Fedora Release Engineering
0d4d1adb0a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 08:25:28 +00:00
Tomas Korbar
d92f8fb294 Add licenses to fully conform to SPDX 2023-11-02 09:44:36 +01:00
Fedora Release Engineering
f4c5da67ef Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 17:59:55 +00:00
František Hrdina
d93313bb15 Adding fmf plan and gating.yaml 2023-04-03 09:11:58 +02:00
Tomas Korbar
65ace30c12 Change the License tag to the SPDX format 2023-03-11 12:11:18 +01:00
Fedora Release Engineering
1b7c8f7cfe Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 06:37:46 +00:00
Tomas Korbar
0aaeecd47d Rebase to 5.6.0
Resolves: rhbz#2148994
2022-12-08 15:09:22 +01:00
Fedora Release Engineering
ff221c721a Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 12:13:55 +00:00
Tomas Korbar
5f0f312699 Rebase to 5.5.0
Resolves: rhbz#2105686
2022-07-13 12:52:32 +02:00
Peter Lemenkov
89b10b6537 Fix CVE-2021-44269
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2022-04-06 22:27:07 +02:00
Fedora Release Engineering
65c9683474 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 04:17:38 +00:00
Fedora Release Engineering
f167601c17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 20:46:50 +00:00
Fedora Release Engineering
89a885d0ba - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 23:20:33 +00:00
Sérgio M. Basto
8422aeea02 Update wavpack to 5.4.0 (#1915740)
Security fix for CVE-2020-35738
2021-01-17 13:34:00 +00:00
Tom Stellard
4373b17c46 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-09 00:50:21 +00:00
Fedora Release Engineering
534fc62e34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 13:59:15 +00:00
Peter Lemenkov
c9bfacd3ec forgot to upload files
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2020-04-18 21:12:10 +02:00
Peter Lemenkov
5f5c8cb3e6 Update to 5.3.0
Resolves: rhbz#1825218

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2020-04-18 21:08:18 +02:00
Fedora Release Engineering
0e22412bd6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 03:30:43 +00:00
Tomas Korbar
0efd7c4daf Update to 5.2.0
Resolves: rhbz#1785008
2020-01-09 15:10:40 +01:00
22 changed files with 412 additions and 717 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

2
.gitignore vendored
View file

@ -1,2 +1,2 @@
*~
/wavpack-[0-9]*.[0-9]*.[0-9]*.tar.bz2
/wavpack-*.tar.bz2

222
changelog Normal file
View file

@ -0,0 +1,222 @@
* Mon Jul 29 2024 Tomas Korbar <tkorbar@redhat.com> - 5.7.0-3
- Disable asm code parts
- ASM code parts break support for cf-protection on x86_64,
since they do not contain such feature. This situation is
likely to repeat in the future and thus all code parts
should be compiled by compiler which knows distribution
settings.
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Mar 13 2024 Tomas Korbar <tkorbar@redhat.com> - 5.7.0-1
- Rebase to 5.7.0
- Resolves: rhbz#2267425
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Nov 02 2023 Tomas Korbar <tkorbar@redhat.com> - 5.6.0-5
- Add licenses to fully conform to SPDX
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Mar 11 2023 Tomas Korbar <tkorbar@redhat.com> - 5.6.0-3
- Change the License tag to the SPDX format
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Dec 08 2022 Tomas Korbar <tkorbar@redhat.com> - 5.6.0-1
- Rebase to 5.6.0
- Resolves: rhbz#2148994
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jul 13 2022 Tomas Korbar <tkorbar@redhat.com> - 5.5.0-1
- Rebase to 5.5.0
- Resolves: rhbz#2105686
* Wed Apr 6 2022 Peter Lemenkov <lemenkov@gmail.com> - 5.4.0-5
- Fix for CVE-2021-44269
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 17 2021 Sérgio Basto <sergio@serjux.com> - 5.4.0-1
- Update wavpack to 5.4.0 (#1915740)
- Security fix for CVE-2020-35738
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Apr 18 2020 Peter Lemenkov <lemenkov@gmail.com> - 5.3.0-1
- Update to 5.3.0
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 09 2020 Tomas Korbar <tkorbar@redhat.com> - 5.2.0-1
- Update to 5.2.0
* Mon Aug 19 2019 Tomas Korbar <tkorbar@redhat.com> - 5.1.0-16
- Fix for CVE-2019-1010317
* Mon Aug 19 2019 Tomas Korbar <tkorbar@redhat.com> - 5.1.0-15
- Fix for CVE-2019-1010319
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 17 2019 Peter Lemenkov <lemenkov@gmail.com> - 5.1.0-13
- Fix for CVE-2019-11498
* Wed Apr 10 2019 Peter Lemenkov <lemenkov@gmail.com> - 5.1.0-12
- Fix for CVE-2018-19840, CVE-2018-19841
* Thu Feb 28 2019 Sérgio Basto <sergio@serjux.com> - 5.1.0-11
- Make the manual pages decompression format agnostic
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue May 22 2018 Miroslav Lichvar <mlichvar@redhat.com> - 5.1.0-8
- Fix for CVE-2018-10536, CVE-2018-10537, CVE-2018-10538, CVE-2018-10539,
CVE-2018-10540
* Tue Feb 20 2018 Peter Lemenkov <lemenkov@gmail.com> - 5.1.0-7
- Fix for CVE-2018-6767, CVE-2018-7253, and two more GH issues
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.1.0-5
- Switch to %%ldconfig_scriptlets
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 01 2017 Sérgio Basto <sergio@serjux.com> - 5.1.0-1
- Update wavpack to 5.1.0
* Thu Apr 21 2016 Sérgio Basto <sergio@serjux.com> - 4.80.0-1
- Update wavpack to 4.80.0
* Mon Mar 28 2016 Sérgio Basto <sergio@serjux.com> - 4.75.2-1
- Update to 4.75.2
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.70.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.70.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 4.70.0-4
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.70.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.70.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Feb 17 2014 Peter Lemenkov <lemenkov@gmail.com> - 4.70.0-1
- Ver. 4.70.0
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sun Jul 21 2013 Peter Lemenkov <lemenkov@gmail.com> - 4.60.1-7
- Reconfigure to allow building on AArch64
- Cleanup spec-file
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jan 3 2013 Miroslav Lichvar <mlichvar@redhat.com> 4.60.1-5
- Fix -Wstrict-aliasing compiler warnings
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Jan 9 2011 Peter Lemenkov <lemenkov@gmail.com> 4.60.1-1
- Version 4.60.1 (bugfix release)
- Added man-pages
- The only patch was rebased
- Small cosmetic spec-file cleanups
* Mon Sep 28 2009 Peter Lemenkov <lemenkov@gmail.com> 4.60-1
- Version 4.60
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.50.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.50.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Aug 30 2008 Peter Lemenkov <lemenkov@gmail.com> 4.50.1-2
- Fixes to meet the Fedora Packaging Guidelines
* Sun Aug 24 2008 Peter Lemenkov <lemenkov@gmail.com> 4.50.1-1
- Version 4.50.1
* Wed Jun 18 2008 Peter Lemenkov <lemenkov@gmail.com> 4.50-1
- Version 4.50
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.41-2
- Autorebuild for GCC 4.3
* Sat May 12 2007 Peter Lemenkov <lemenkov@gmail.com> 4.41-1
- Version 4.41
- Removed unnecessary --with-pic
* Fri Dec 15 2006 Peter Lemenkov <lemenkov@gmail.com> 4.40-1.1
- Rebuild
* Fri Dec 15 2006 Peter Lemenkov <lemenkov@gmail.com> 4.40-1
- Version 4.40
* Tue Sep 12 2006 Peter Lemenkov <lemenkov@gmail.com> 4.32-3%{?dist}
- Rebuild for FC6
* Sat Jul 01 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.32-2%{?dist}
- force PIC-only code
* Wed Jun 28 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.32-1%{?dist}
- Version 4.32
* Thu Mar 30 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.31-2%{?dist}
- rebuild
* Sat Jan 07 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.31-1
- Fixed several issues with wavpack.pc.in
- Cosmetic fixes.
- Version 4.31
* Sun Nov 13 2005 Peter Lemenkov <lemenkov@newmail.ru> 4.3-1
- Initial build for FC-Extras
- Version 4.3

16
gating.yaml Normal file
View file

@ -0,0 +1,16 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_testing]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
#gating rawhide
--- !Policy
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_stable]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

6
plans/all.fmf Normal file
View file

@ -0,0 +1,6 @@
summary: Test plan with all Fedora tests
discover:
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/wavpack.git
execute:
how: tmt

View file

@ -1 +1 @@
SHA512 (wavpack-5.1.0.tar.bz2) = 4c31616ae63c3a875afa20f26ce935f7a8f9921e2892b4b8388eca3ccd83b2d686f43eed8b9ec1dead934a1148401b9dced3b05f509b7942c48d7af31cf80a54
SHA512 (wavpack-5.9.0.tar.bz2) = dc32f7115a9185956ed2713651b990b1e34894fb5a001abc3f277f41111ded41c5e0cd8740f9c55a226ab58170c633fd7cc52270afdd72c75edf111db75ef4cd

View file

@ -0,0 +1,18 @@
From: Sandro Mani <manisandro@gmail.com>
Date: Mon, 5 Dec 2022 14:43:54 +0100
Subject: [PATCH] fix for MinGW
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b5d26d..b633572 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -632,7 +632,7 @@ install(TARGETS ${WAVPACK_INSTALL_TARGETS}
if(WAVPACK_INSTALL_CMAKE_MODULE)
- if(WIN32)
+ if(MSVC)
set(CMAKE_INSTALL_PACKAGEDIR cmake)
else()
set(CMAKE_INSTALL_PACKAGEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

View file

@ -1,108 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Sun, 4 Feb 2018 11:28:15 -0800
Subject: [PATCH] issue #27, do not overwrite stack on corrupt RF64 file
diff --git a/cli/riff.c b/cli/riff.c
index 8b1af45..de98c1e 100644
--- a/cli/riff.c
+++ b/cli/riff.c
@@ -42,6 +42,7 @@ typedef struct {
#pragma pack(pop)
+#define CS64ChunkFormat "4D"
#define DS64ChunkFormat "DDDL"
#define WAVPACK_NO_ERROR 0
@@ -101,13 +102,13 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
if (!strncmp (chunk_header.ckID, "ds64", 4)) {
if (chunk_header.ckSize < sizeof (DS64Chunk) ||
- !DoReadFile (infile, &ds64_chunk, chunk_header.ckSize, &bcount) ||
- bcount != chunk_header.ckSize) {
+ !DoReadFile (infile, &ds64_chunk, sizeof (DS64Chunk), &bcount) ||
+ bcount != sizeof (DS64Chunk)) {
error_line ("%s is not a valid .WAV file!", infilename);
return WAVPACK_SOFT_ERROR;
}
else if (!(config->qmode & QMODE_NO_STORE_WRAPPER) &&
- !WavpackAddWrapper (wpc, &ds64_chunk, chunk_header.ckSize)) {
+ !WavpackAddWrapper (wpc, &ds64_chunk, sizeof (DS64Chunk))) {
error_line ("%s", WavpackGetErrorMessage (wpc));
return WAVPACK_SOFT_ERROR;
}
@@ -315,10 +316,11 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples, int qmode)
{
- int do_rf64 = 0, write_junk = 1;
+ int do_rf64 = 0, write_junk = 1, table_length = 0;
ChunkHeader ds64hdr, datahdr, fmthdr;
RiffChunkHeader riffhdr;
DS64Chunk ds64_chunk;
+ CS64Chunk cs64_chunk;
JunkChunk junkchunk;
WaveHeader wavhdr;
uint32_t bcount;
@@ -380,6 +382,7 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples,
strncpy (riffhdr.formType, "WAVE", sizeof (riffhdr.formType));
total_riff_bytes = sizeof (riffhdr) + wavhdrsize + sizeof (datahdr) + ((total_data_bytes + 1) & ~(int64_t)1);
if (do_rf64) total_riff_bytes += sizeof (ds64hdr) + sizeof (ds64_chunk);
+ total_riff_bytes += table_length * sizeof (CS64Chunk);
if (write_junk) total_riff_bytes += sizeof (junkchunk);
strncpy (fmthdr.ckID, "fmt ", sizeof (fmthdr.ckID));
strncpy (datahdr.ckID, "data", sizeof (datahdr.ckID));
@@ -394,11 +397,12 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples,
if (do_rf64) {
strncpy (ds64hdr.ckID, "ds64", sizeof (ds64hdr.ckID));
- ds64hdr.ckSize = sizeof (ds64_chunk);
+ ds64hdr.ckSize = sizeof (ds64_chunk) + (table_length * sizeof (CS64Chunk));
CLEAR (ds64_chunk);
ds64_chunk.riffSize64 = total_riff_bytes;
ds64_chunk.dataSize64 = total_data_bytes;
ds64_chunk.sampleCount64 = total_samples;
+ ds64_chunk.tableLength = table_length;
riffhdr.ckSize = (uint32_t) -1;
datahdr.ckSize = (uint32_t) -1;
WavpackNativeToLittleEndian (&ds64hdr, ChunkHeaderFormat);
@@ -409,6 +413,14 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples,
datahdr.ckSize = (uint32_t) total_data_bytes;
}
+ // this "table" is just a dummy placeholder for testing (normally not written)
+
+ if (table_length) {
+ strncpy (cs64_chunk.ckID, "dmmy", sizeof (cs64_chunk.ckID));
+ cs64_chunk.chunkSize64 = 12345678;
+ WavpackNativeToLittleEndian (&cs64_chunk, CS64ChunkFormat);
+ }
+
// write the RIFF chunks up to just before the data starts
WavpackNativeToLittleEndian (&riffhdr, ChunkHeaderFormat);
@@ -418,8 +430,21 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples,
if (!DoWriteFile (outfile, &riffhdr, sizeof (riffhdr), &bcount) || bcount != sizeof (riffhdr) ||
(do_rf64 && (!DoWriteFile (outfile, &ds64hdr, sizeof (ds64hdr), &bcount) || bcount != sizeof (ds64hdr))) ||
- (do_rf64 && (!DoWriteFile (outfile, &ds64_chunk, sizeof (ds64_chunk), &bcount) || bcount != sizeof (ds64_chunk))) ||
- (write_junk && (!DoWriteFile (outfile, &junkchunk, sizeof (junkchunk), &bcount) || bcount != sizeof (junkchunk))) ||
+ (do_rf64 && (!DoWriteFile (outfile, &ds64_chunk, sizeof (ds64_chunk), &bcount) || bcount != sizeof (ds64_chunk)))) {
+ error_line ("can't write .WAV data, disk probably full!");
+ return FALSE;
+ }
+
+ // again, this is normally not written except for testing
+
+ while (table_length--)
+ if (!DoWriteFile (outfile, &cs64_chunk, sizeof (cs64_chunk), &bcount) || bcount != sizeof (cs64_chunk)) {
+ error_line ("can't write .WAV data, disk probably full!");
+ return FALSE;
+ }
+
+
+ if ((write_junk && (!DoWriteFile (outfile, &junkchunk, sizeof (junkchunk), &bcount) || bcount != sizeof (junkchunk))) ||
!DoWriteFile (outfile, &fmthdr, sizeof (fmthdr), &bcount) || bcount != sizeof (fmthdr) ||
!DoWriteFile (outfile, &wavhdr, wavhdrsize, &bcount) || bcount != wavhdrsize ||
!DoWriteFile (outfile, &datahdr, sizeof (datahdr), &bcount) || bcount != sizeof (datahdr)) {

View file

@ -0,0 +1,18 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 25 Oct 2024 19:15:33 +0300
Subject: [PATCH] We compile only ANSI C sources
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b633572..d2b730b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.2...3.10)
-project(WavPack VERSION 5.9.0)
+project(WavPack VERSION 5.9.0 LANGUAGES C)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" CONFIGURE_AC)
string(REGEX MATCH "LT_CURRENT=([0-9]+)" LT_CURRENT "${CONFIGURE_AC}")

View file

@ -1,28 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Sat, 10 Feb 2018 16:01:39 -0800
Subject: [PATCH] issue #28, do not overwrite heap on corrupt DSDIFF file
diff --git a/cli/dsdiff.c b/cli/dsdiff.c
index 410dc1c..c016df9 100644
--- a/cli/dsdiff.c
+++ b/cli/dsdiff.c
@@ -153,7 +153,17 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
error_line ("dsdiff file version = 0x%08x", version);
}
else if (!strncmp (dff_chunk_header.ckID, "PROP", 4)) {
- char *prop_chunk = malloc ((size_t) dff_chunk_header.ckDataSize);
+ char *prop_chunk;
+
+ if (dff_chunk_header.ckDataSize < 4 || dff_chunk_header.ckDataSize > 1024) {
+ error_line ("%s is not a valid .DFF file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
+ if (debug_logging_mode)
+ error_line ("got PROP chunk of %d bytes total", (int) dff_chunk_header.ckDataSize);
+
+ prop_chunk = malloc ((size_t) dff_chunk_header.ckDataSize);
if (!DoReadFile (infile, prop_chunk, (uint32_t) dff_chunk_header.ckDataSize, &bcount) ||
bcount != dff_chunk_header.ckDataSize) {

View file

@ -1,62 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Sun, 11 Feb 2018 16:37:47 -0800
Subject: [PATCH] issue #28, fix buffer overflows and bad allocs on corrupt CAF
files
diff --git a/cli/caff.c b/cli/caff.c
index ae57c4b..6248a71 100644
--- a/cli/caff.c
+++ b/cli/caff.c
@@ -89,8 +89,8 @@ typedef struct
#define CAFChannelDescriptionFormat "LLLLL"
-static const char TMH_full [] = { 1,2,3,13,9,10,5,6,12,14,15,16,17,9,4,18,7,8,19,20,21 };
-static const char TMH_std [] = { 1,2,3,11,8,9,5,6,10,12,13,14,15,7,4,16 };
+static const char TMH_full [] = { 1,2,3,13,9,10,5,6,12,14,15,16,17,9,4,18,7,8,19,20,21,0 };
+static const char TMH_std [] = { 1,2,3,11,8,9,5,6,10,12,13,14,15,7,4,16,0 };
static struct {
uint32_t mChannelLayoutTag; // Core Audio layout, 100 - 146 in high word, num channels in low word
@@ -274,10 +274,19 @@ int ParseCaffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
}
}
else if (!strncmp (caf_chunk_header.mChunkType, "chan", 4)) {
- CAFChannelLayout *caf_channel_layout = malloc ((size_t) caf_chunk_header.mChunkSize);
+ CAFChannelLayout *caf_channel_layout;
- if (caf_chunk_header.mChunkSize < sizeof (CAFChannelLayout) ||
- !DoReadFile (infile, caf_channel_layout, (uint32_t) caf_chunk_header.mChunkSize, &bcount) ||
+ if (caf_chunk_header.mChunkSize < sizeof (CAFChannelLayout) || caf_chunk_header.mChunkSize > 1024) {
+ error_line ("this .CAF file has an invalid 'chan' chunk!");
+ return WAVPACK_SOFT_ERROR;
+ }
+
+ if (debug_logging_mode)
+ error_line ("'chan' chunk is %d bytes", (int) caf_chunk_header.mChunkSize);
+
+ caf_channel_layout = malloc ((size_t) caf_chunk_header.mChunkSize);
+
+ if (!DoReadFile (infile, caf_channel_layout, (uint32_t) caf_chunk_header.mChunkSize, &bcount) ||
bcount != caf_chunk_header.mChunkSize) {
error_line ("%s is not a valid .CAF file!", infilename);
free (caf_channel_layout);
@@ -495,8 +504,15 @@ int ParseCaffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
}
else { // just copy unknown chunks to output file
- int bytes_to_copy = (uint32_t) caf_chunk_header.mChunkSize;
- char *buff = malloc (bytes_to_copy);
+ uint32_t bytes_to_copy = (uint32_t) caf_chunk_header.mChunkSize;
+ char *buff;
+
+ if (caf_chunk_header.mChunkSize < 0 || caf_chunk_header.mChunkSize > 1048576) {
+ error_line ("%s is not a valid .CAF file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
+ buff = malloc (bytes_to_copy);
if (debug_logging_mode)
error_line ("extra unknown chunk \"%c%c%c%c\" of %d bytes",

View file

@ -1,65 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Tue, 24 Apr 2018 17:27:01 -0700
Subject: [PATCH] issue #33, sanitize size of unknown chunks before malloc()
diff --git a/cli/dsdiff.c b/cli/dsdiff.c
index c016df9..fa56bbb 100644
--- a/cli/dsdiff.c
+++ b/cli/dsdiff.c
@@ -279,7 +279,14 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
else { // just copy unknown chunks to output file
int bytes_to_copy = (int)(((dff_chunk_header.ckDataSize) + 1) & ~(int64_t)1);
- char *buff = malloc (bytes_to_copy);
+ char *buff;
+
+ if (bytes_to_copy < 0 || bytes_to_copy > 4194304) {
+ error_line ("%s is not a valid .DFF file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
+ buff = malloc (bytes_to_copy);
if (debug_logging_mode)
error_line ("extra unknown chunk \"%c%c%c%c\" of %d bytes",
diff --git a/cli/riff.c b/cli/riff.c
index de98c1e..7bddf63 100644
--- a/cli/riff.c
+++ b/cli/riff.c
@@ -286,7 +286,14 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
else { // just copy unknown chunks to output file
int bytes_to_copy = (chunk_header.ckSize + 1) & ~1L;
- char *buff = malloc (bytes_to_copy);
+ char *buff;
+
+ if (bytes_to_copy < 0 || bytes_to_copy > 4194304) {
+ error_line ("%s is not a valid .WAV file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
+ buff = malloc (bytes_to_copy);
if (debug_logging_mode)
error_line ("extra unknown chunk \"%c%c%c%c\" of %d bytes",
diff --git a/cli/wave64.c b/cli/wave64.c
index 591d640..fa928a0 100644
--- a/cli/wave64.c
+++ b/cli/wave64.c
@@ -241,7 +241,14 @@ int ParseWave64HeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
}
else { // just copy unknown chunks to output file
int bytes_to_copy = (chunk_header.ckSize + 7) & ~7L;
- char *buff = malloc (bytes_to_copy);
+ char *buff;
+
+ if (bytes_to_copy < 0 || bytes_to_copy > 4194304) {
+ error_line ("%s is not a valid .W64 file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
+ buff = malloc (bytes_to_copy);
if (debug_logging_mode)
error_line ("extra unknown chunk \"%c%c%c%c\" of %d bytes",

View file

@ -1,55 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Tue, 24 Apr 2018 22:18:07 -0700
Subject: [PATCH] issue #30 issue #31 issue #32: no multiple format chunks in
WAV or W64
diff --git a/cli/riff.c b/cli/riff.c
index 7bddf63..5d6452e 100644
--- a/cli/riff.c
+++ b/cli/riff.c
@@ -53,7 +53,7 @@ extern int debug_logging_mode;
int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config)
{
- int is_rf64 = !strncmp (fourcc, "RF64", 4), got_ds64 = 0;
+ int is_rf64 = !strncmp (fourcc, "RF64", 4), got_ds64 = 0, format_chunk = 0;
int64_t total_samples = 0, infilesize;
RiffChunkHeader riff_chunk_header;
ChunkHeader chunk_header;
@@ -140,6 +140,11 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
else if (!strncmp (chunk_header.ckID, "fmt ", 4)) { // if it's the format chunk, we want to get some info out of there and
int supported = TRUE, format; // make sure it's a .wav file we can handle
+ if (format_chunk++) {
+ error_line ("%s is not a valid .WAV file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
if (chunk_header.ckSize < 16 || chunk_header.ckSize > sizeof (WaveHeader) ||
!DoReadFile (infile, &WaveHeader, chunk_header.ckSize, &bcount) ||
bcount != chunk_header.ckSize) {
diff --git a/cli/wave64.c b/cli/wave64.c
index fa928a0..0388dc7 100644
--- a/cli/wave64.c
+++ b/cli/wave64.c
@@ -53,6 +53,7 @@ int ParseWave64HeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
Wave64ChunkHeader chunk_header;
Wave64FileHeader filehdr;
WaveHeader WaveHeader;
+ int format_chunk = 0;
uint32_t bcount;
infilesize = DoGetFileSize (infile);
@@ -104,6 +105,11 @@ int ParseWave64HeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
if (!memcmp (chunk_header.ckID, fmt_guid, sizeof (fmt_guid))) {
int supported = TRUE, format;
+ if (format_chunk++) {
+ error_line ("%s is not a valid .W64 file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
chunk_header.ckSize = (chunk_header.ckSize + 7) & ~7L;
if (chunk_header.ckSize < 16 || chunk_header.ckSize > sizeof (WaveHeader) ||

View file

@ -1,21 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Thu, 29 Nov 2018 21:00:42 -0800
Subject: [PATCH] issue #53: error out on zero sample rate
diff --git a/src/pack_utils.c b/src/pack_utils.c
index 1918c18..ee3debf 100644
--- a/src/pack_utils.c
+++ b/src/pack_utils.c
@@ -195,6 +195,11 @@ int WavpackSetConfiguration64 (WavpackContext *wpc, WavpackConfig *config, int64
int num_chans = config->num_channels;
int i;
+ if (!config->sample_rate) {
+ strcpy (wpc->error_message, "sample rate cannot be zero!");
+ return FALSE;
+ }
+
wpc->stream_version = (config->flags & CONFIG_COMPATIBLE_WRITE) ? CUR_STREAM_VERS : MAX_STREAM_VERS;
if ((config->qmode & QMODE_DSD_AUDIO) && config->bytes_per_sample == 1 && config->bits_per_sample == 8) {

View file

@ -1,25 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Thu, 29 Nov 2018 21:53:51 -0800
Subject: [PATCH] issue #54: fix potential out-of-bounds heap read
diff --git a/src/open_utils.c b/src/open_utils.c
index fc9440c..ce0879c 100644
--- a/src/open_utils.c
+++ b/src/open_utils.c
@@ -1258,13 +1258,13 @@ int WavpackVerifySingleBlock (unsigned char *buffer, int verify_checksum)
#endif
if (meta_bc == 4) {
- if (*dp++ != (csum & 0xff) || *dp++ != ((csum >> 8) & 0xff) || *dp++ != ((csum >> 16) & 0xff) || *dp++ != ((csum >> 24) & 0xff))
+ if (*dp != (csum & 0xff) || dp[1] != ((csum >> 8) & 0xff) || dp[2] != ((csum >> 16) & 0xff) || dp[3] != ((csum >> 24) & 0xff))
return FALSE;
}
else {
csum ^= csum >> 16;
- if (*dp++ != (csum & 0xff) || *dp++ != ((csum >> 8) & 0xff))
+ if (*dp != (csum & 0xff) || dp[1] != ((csum >> 8) & 0xff))
return FALSE;
}

View file

@ -1,18 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Sun, 26 Aug 2018 20:24:00 -0700
Subject: [PATCH] issue #41: make sure DFF chunk does not have negative length
diff --git a/cli/dsdiff.c b/cli/dsdiff.c
index fa56bbb..c65aed3 100644
--- a/cli/dsdiff.c
+++ b/cli/dsdiff.c
@@ -188,7 +188,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
cptr += sizeof (dff_chunk_header);
WavpackBigEndianToNative (&dff_chunk_header, DFFChunkHeaderFormat);
- if (eptr - cptr >= dff_chunk_header.ckDataSize) {
+ if (dff_chunk_header.ckDataSize > 0 && dff_chunk_header.ckDataSize <= eptr - cptr) {
if (!strncmp (dff_chunk_header.ckID, "FS ", 4) && dff_chunk_header.ckDataSize == 4) {
memcpy (&sampleRate, cptr, sizeof (sampleRate));
WavpackBigEndianToNative (&sampleRate, "L");

View file

@ -1,34 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Sun, 26 Aug 2018 21:25:38 -0700
Subject: [PATCH] issue #43: catch zero channel count in DSF and DSDIFF files
diff --git a/cli/dsdiff.c b/cli/dsdiff.c
index c65aed3..738a46b 100644
--- a/cli/dsdiff.c
+++ b/cli/dsdiff.c
@@ -204,6 +204,12 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
chansSpecified = (int)(dff_chunk_header.ckDataSize - sizeof (numChannels)) / 4;
+ if (numChannels < chansSpecified || numChannels < 1) {
+ error_line ("%s is not a valid .DFF file!", infilename);
+ free (prop_chunk);
+ return WAVPACK_SOFT_ERROR;
+ }
+
while (chansSpecified--) {
if (!strncmp (cptr, "SLFT", 4) || !strncmp (cptr, "MLFT", 4))
chanMask |= 0x1;
diff --git a/cli/dsf.c b/cli/dsf.c
index cd82ae9..d12e409 100644
--- a/cli/dsf.c
+++ b/cli/dsf.c
@@ -122,6 +122,7 @@ int ParseDsfHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackC
if (format_chunk.ckSize != sizeof (DSFFormatChunk) || format_chunk.formatVersion != 1 ||
format_chunk.formatID != 0 || format_chunk.blockSize != DSF_BLOCKSIZE || format_chunk.reserved ||
(format_chunk.bitsPerSample != 1 && format_chunk.bitsPerSample != 8) ||
+ format_chunk.numChannels < 1 || format_chunk.numChannels > 6 ||
format_chunk.chanType < 1 || format_chunk.chanType > NUM_CHAN_TYPES) {
error_line ("%s is not a valid .DSF file!", infilename);
return WAVPACK_SOFT_ERROR;

View file

@ -1,40 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Sat, 2 Mar 2019 18:37:14 -0800
Subject: [PATCH] issue #65: make sure DSDIFF files have a valid channel count
diff --git a/cli/dsdiff.c b/cli/dsdiff.c
index 738a46b..1d637d7 100644
--- a/cli/dsdiff.c
+++ b/cli/dsdiff.c
@@ -180,7 +180,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
if (!strncmp (prop_chunk, "SND ", 4)) {
char *cptr = prop_chunk + 4, *eptr = prop_chunk + dff_chunk_header.ckDataSize;
- uint16_t numChannels, chansSpecified, chanMask = 0;
+ uint16_t numChannels = 0, chansSpecified, chanMask = 0;
uint32_t sampleRate;
while (eptr - cptr >= sizeof (dff_chunk_header)) {
@@ -204,7 +204,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
chansSpecified = (int)(dff_chunk_header.ckDataSize - sizeof (numChannels)) / 4;
- if (numChannels < chansSpecified || numChannels < 1) {
+ if (numChannels < chansSpecified || numChannels < 1 || numChannels > 256) {
error_line ("%s is not a valid .DFF file!", infilename);
free (prop_chunk);
return WAVPACK_SOFT_ERROR;
@@ -279,6 +279,12 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
free (prop_chunk);
}
else if (!strncmp (dff_chunk_header.ckID, "DSD ", 4)) {
+
+ if (!config->num_channels) {
+ error_line ("%s is not a valid .DFF file!", infilename);
+ return WAVPACK_SOFT_ERROR;
+ }
+
total_samples = dff_chunk_header.ckDataSize / config->num_channels;
break;
}

View file

@ -1,28 +0,0 @@
From: David Bryant <david@wavpack.com>
Date: Tue, 5 Mar 2019 21:32:27 -0800
Subject: [PATCH] issue #67: make sure sample rate is specified and non-zero in
DFF files
diff --git a/cli/dsdiff.c b/cli/dsdiff.c
index 1d637d7..32d276c 100644
--- a/cli/dsdiff.c
+++ b/cli/dsdiff.c
@@ -181,7 +181,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
if (!strncmp (prop_chunk, "SND ", 4)) {
char *cptr = prop_chunk + 4, *eptr = prop_chunk + dff_chunk_header.ckDataSize;
uint16_t numChannels = 0, chansSpecified, chanMask = 0;
- uint32_t sampleRate;
+ uint32_t sampleRate = 0;
while (eptr - cptr >= sizeof (dff_chunk_header)) {
memcpy (&dff_chunk_header, cptr, sizeof (dff_chunk_header));
@@ -280,7 +280,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
}
else if (!strncmp (dff_chunk_header.ckID, "DSD ", 4)) {
- if (!config->num_channels) {
+ if (!config->num_channels || !config->sample_rate) {
error_line ("%s is not a valid .DFF file!", infilename);
return WAVPACK_SOFT_ERROR;
}

View file

@ -1,12 +0,0 @@
diff --git a/cli/wave64.c b/cli/wave64.c
index 7beffe6..59548b1 100644
--- a/cli/wave64.c
+++ b/cli/wave64.c
@@ -56,6 +56,7 @@ int ParseWave64HeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
int format_chunk = 0;
uint32_t bcount;
+ CLEAR (WaveHeader);
infilesize = DoGetFileSize (infile);
memcpy (&filehdr, fourcc, 4);

View file

@ -1,30 +0,0 @@
diff --git a/cli/caff.c b/cli/caff.c
index 2a5e2d9..a35da74 100644
--- a/cli/caff.c
+++ b/cli/caff.c
@@ -152,7 +152,7 @@ static struct {
int ParseCaffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config)
{
- uint32_t chan_chunk = 0, channel_layout = 0, bcount;
+ uint32_t chan_chunk = 0, desc_chunk = 0, channel_layout = 0, bcount;
unsigned char *channel_identities = NULL;
unsigned char *channel_reorder = NULL;
int64_t total_samples = 0, infilesize;
@@ -218,6 +218,7 @@ int ParseCaffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
}
WavpackBigEndianToNative (&caf_audio_format, CAFAudioFormatFormat);
+ desc_chunk = 1;
if (debug_logging_mode) {
char formatstr [5];
@@ -458,7 +459,7 @@ int ParseCaffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
else if (!strncmp (caf_chunk_header.mChunkType, "data", 4)) { // on the data chunk, get size and exit loop
uint32_t mEditCount;
- if (!DoReadFile (infile, &mEditCount, sizeof (mEditCount), &bcount) ||
+ if (!desc_chunk || !DoReadFile (infile, &mEditCount, sizeof (mEditCount), &bcount) ||
bcount != sizeof (mEditCount)) {
error_line ("%s is not a valid .CAF file!", infilename);
return WAVPACK_SOFT_ERROR;

View file

@ -1,65 +1,129 @@
Name: wavpack
Summary: A completely open audiocodec
Version: 5.1.0
Release: 16%{?dist}
License: BSD
Url: http://www.wavpack.com/
Source: http://www.wavpack.com/%{name}-%{version}.tar.bz2
Patch1: wavpack-0001-issue-27-do-not-overwrite-stack-on-corrupt-RF64-file.patch
Patch2: wavpack-0002-issue-28-do-not-overwrite-heap-on-corrupt-DSDIFF-fil.patch
Patch3: wavpack-0003-issue-28-fix-buffer-overflows-and-bad-allocs-on-corr.patch
Patch4: wavpack-0004-issue-33-sanitize-size-of-unknown-chunks-before-mall.patch
Patch5: wavpack-0005-issue-30-issue-31-issue-32-no-multiple-format-chunks.patch
Patch6: wavpack-0006-issue-53-error-out-on-zero-sample-rate.patch
Patch7: wavpack-0007-issue-54-fix-potential-out-of-bounds-heap-read.patch
Patch8: wavpack-0008-issue-41-make-sure-DFF-chunk-does-not-have-negative-.patch
Patch9: wavpack-0009-issue-43-catch-zero-channel-count-in-DSF-and-DSDIFF-.patch
Patch10: wavpack-0010-issue-65-make-sure-DSDIFF-files-have-a-valid-channel.patch
Patch11: wavpack-0011-issue-67-make-sure-sample-rate-is-specified-and-non-.patch
Patch12: wavpack-0012-issue-68-clear-WaveHeader-at-start-to-prevent-uninit.patch
Patch13: wavpack-0013-issue-66-make-sure-CAF-files-have-a-desc-chunk.patch
# For autoreconf
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
%if 0%{?fedora}
%bcond_without mingw
%else
%bcond_with mingw
%endif
%description
%global common_description %{expand:
WavPack is a completely open audio compression format providing lossless,
high-quality lossy, and a unique hybrid compression mode. Although the
technology is loosely based on previous versions of WavPack, the new
version 4 format has been designed from the ground up to offer unparalleled
performance and functionality.
performance and functionality.}
Name: wavpack
Summary: A completely open audiocodec
Version: 5.9.0
Release: %autorelease
License: BSD-3-Clause AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
Url: https://www.wavpack.com/
Source: https://www.wavpack.com/%{name}-%{version}.tar.bz2
# Fedora-specific
Patch1: wavpack-0001-fix-for-MinGW.patch
# Fedora-specific (we do not build any C++ code)
Patch2: wavpack-0002-We-compile-only-ANSI-C-sources.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: make
%if %{with mingw}
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc
%endif
%description
%{common_description}
%package devel
Summary: WavPack - development files
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
Files needed for developing apps using wavpack
%if %{with mingw}
%package -n mingw32-%{name}
Summary: %{summary}
BuildArch: noarch
%description -n mingw32-%{name}
%{common_description}
This package is MinGW compiled wavpack library for the Win32 target.
%package -n mingw32-%{name}-tools
Summary: %{summary} tools
BuildArch: noarch
Requires: mingw32-%{name} = %{version}-%{release}
%description -n mingw32-%{name}-tools
%{common_description}
This package is MinGW compiled wavpack tools for the Win32 target.
%package -n mingw64-%{name}
Summary: %{summary}
BuildArch: noarch
%description -n mingw64-%{name}
%{common_description}
This package is MinGW compiled wavpack library for the Win64 target.
%package -n mingw64-%{name}-tools
Summary: %{summary} tools
BuildArch: noarch
Requires: mingw64-%{name} = %{version}-%{release}
%description -n mingw64-%{name}-tools
%{common_description}
This package is MinGW compiled wavpack tools for the Win64 target.
%endif
%{?mingw_debug_package}
%prep
%autosetup -p1
%build
autoreconf -ivf
# Debian and Buildroot recomendation:
# WavPack "autodetects" CPU type to enable ASM code. However, the assembly code
# for ARM is written for ARMv7 only and building WavPack for an ARM-non-v7
# architecture will fail.
# http://lists.busybox.net/pipermail/buildroot/2015-October/142117.html
%configure --disable-static \
%ifarch armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv6hl
--disable-asm \
%cmake -DWAVPACK_ENABLE_ASM=OFF
%cmake_build
%if %{with mingw}
%mingw_cmake -DWAVPACK_ENABLE_ASM=OFF
%mingw_make_build
%endif
make %{?_smp_mflags}
%install
%make_install
%cmake_install
rm -f %{buildroot}/%{_libdir}/*.la
# we will install the documentation ourselves through the %doc macro
rm -rf %{buildroot}/%{_docdir}/
%ldconfig_scriptlets
%if %{with mingw}
%mingw_make_install
# remove libtool files
rm -f %{buildroot}%{mingw32_libdir}/*.la
rm -f %{buildroot}%{mingw64_libdir}/*.la
# remove documentation (it's in the native version)
rm -rf %{buildroot}%{mingw32_docdir}
rm -rf %{buildroot}%{mingw32_mandir}
rm -rf %{buildroot}%{mingw64_docdir}
rm -rf %{buildroot}%{mingw64_mandir}
%endif
%{?mingw_debug_install_post}
%files
%{_bindir}/*
@ -68,167 +132,43 @@ rm -f %{buildroot}/%{_libdir}/*.la
%{_mandir}/man1/wvgain.1*
%{_mandir}/man1/wvunpack.1*
%{_mandir}/man1/wvtag.1*
%doc AUTHORS
%doc AUTHORS doc/wavpack_doc.html doc/style.css
%license COPYING
%files devel
%{_includedir}/*
%{_libdir}/cmake/WavPack/
%{_libdir}/pkgconfig/*
%{_libdir}/libwavpack.so
%doc ChangeLog README
%doc ChangeLog doc/WavPack5PortingGuide.pdf doc/WavPack5LibraryDoc.pdf doc/WavPack5FileFormat.pdf
%if %{with mingw}
%files -n mingw32-wavpack
%doc AUTHORS
%license COPYING
%dir %{mingw32_includedir}/wavpack
%{mingw32_bindir}/libwavpack-1.dll
%{mingw32_includedir}/wavpack/*.h
%{mingw32_libdir}/cmake/WavPack/
%{mingw32_libdir}/libwavpack.dll.a
%{mingw32_libdir}/pkgconfig/*
%files -n mingw32-wavpack-tools
%{mingw32_bindir}/*.exe
%files -n mingw64-wavpack
%doc AUTHORS
%license COPYING
%dir %{mingw64_includedir}/wavpack
%{mingw64_bindir}/libwavpack-1.dll
%{mingw64_includedir}/wavpack/*.h
%{mingw64_libdir}/cmake/WavPack/
%{mingw64_libdir}/libwavpack.dll.a
%{mingw64_libdir}/pkgconfig/*
%files -n mingw64-wavpack-tools
%{mingw64_bindir}/*.exe
%endif
%changelog
* Mon Aug 19 2019 Tomas Korbar <tkorbar@redhat.com> - 5.1.0-16
- Fix for CVE-2019-1010317
* Mon Aug 19 2019 Tomas Korbar <tkorbar@redhat.com> - 5.1.0-15
- Fix for CVE-2019-1010319
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 17 2019 Peter Lemenkov <lemenkov@gmail.com> - 5.1.0-13
- Fix for CVE-2019-11498
* Wed Apr 10 2019 Peter Lemenkov <lemenkov@gmail.com> - 5.1.0-12
- Fix for CVE-2018-19840, CVE-2018-19841
* Thu Feb 28 2019 Sérgio Basto <sergio@serjux.com> - 5.1.0-11
- Make the manual pages decompression format agnostic
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue May 22 2018 Miroslav Lichvar <mlichvar@redhat.com> - 5.1.0-8
- Fix for CVE-2018-10536, CVE-2018-10537, CVE-2018-10538, CVE-2018-10539,
CVE-2018-10540
* Tue Feb 20 2018 Peter Lemenkov <lemenkov@gmail.com> - 5.1.0-7
- Fix for CVE-2018-6767, CVE-2018-7253, and two more GH issues
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.1.0-5
- Switch to %%ldconfig_scriptlets
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 01 2017 Sérgio Basto <sergio@serjux.com> - 5.1.0-1
- Update wavpack to 5.1.0
* Thu Apr 21 2016 Sérgio Basto <sergio@serjux.com> - 4.80.0-1
- Update wavpack to 4.80.0
* Mon Mar 28 2016 Sérgio Basto <sergio@serjux.com> - 4.75.2-1
- Update to 4.75.2
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.70.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.70.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 4.70.0-4
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.70.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.70.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Feb 17 2014 Peter Lemenkov <lemenkov@gmail.com> - 4.70.0-1
- Ver. 4.70.0
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sun Jul 21 2013 Peter Lemenkov <lemenkov@gmail.com> - 4.60.1-7
- Reconfigure to allow building on AArch64
- Cleanup spec-file
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jan 3 2013 Miroslav Lichvar <mlichvar@redhat.com> 4.60.1-5
- Fix -Wstrict-aliasing compiler warnings
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Jan 9 2011 Peter Lemenkov <lemenkov@gmail.com> 4.60.1-1
- Version 4.60.1 (bugfix release)
- Added man-pages
- The only patch was rebased
- Small cosmetic spec-file cleanups
* Mon Sep 28 2009 Peter Lemenkov <lemenkov@gmail.com> 4.60-1
- Version 4.60
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.50.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.50.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Aug 30 2008 Peter Lemenkov <lemenkov@gmail.com> 4.50.1-2
- Fixes to meet the Fedora Packaging Guidelines
* Sun Aug 24 2008 Peter Lemenkov <lemenkov@gmail.com> 4.50.1-1
- Version 4.50.1
* Wed Jun 18 2008 Peter Lemenkov <lemenkov@gmail.com> 4.50-1
- Version 4.50
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.41-2
- Autorebuild for GCC 4.3
* Sat May 12 2007 Peter Lemenkov <lemenkov@gmail.com> 4.41-1
- Version 4.41
- Removed unnecessary --with-pic
* Fri Dec 15 2006 Peter Lemenkov <lemenkov@gmail.com> 4.40-1.1
- Rebuild
* Fri Dec 15 2006 Peter Lemenkov <lemenkov@gmail.com> 4.40-1
- Version 4.40
* Tue Sep 12 2006 Peter Lemenkov <lemenkov@gmail.com> 4.32-3%{?dist}
- Rebuild for FC6
* Sat Jul 01 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.32-2%{?dist}
- force PIC-only code
* Wed Jun 28 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.32-1%{?dist}
- Version 4.32
* Thu Mar 30 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.31-2%{?dist}
- rebuild
* Sat Jan 07 2006 Peter Lemenkov <lemenkov@newmail.ru> 4.31-1
- Fixed several issues with wavpack.pc.in
- Cosmetic fixes.
- Version 4.31
* Sun Nov 13 2005 Peter Lemenkov <lemenkov@newmail.ru> 4.3-1
- Initial build for FC-Extras
- Version 4.3
%autochangelog