summaryrefslogtreecommitdiff
path: root/media-sound/wavpack
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /media-sound/wavpack
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'media-sound/wavpack')
-rw-r--r--media-sound/wavpack/Manifest11
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10536-CVE-2018-10537.patch59
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10538-CVE-2018-10539-CVE-2018-10540.patch70
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-6767.patch111
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7253.patch31
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7254.patch64
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-armv7.patch19
-rw-r--r--media-sound/wavpack/files/wavpack-5.1.0-memleaks.patch32
-rw-r--r--media-sound/wavpack/wavpack-5.3.2.ebuild (renamed from media-sound/wavpack/wavpack-5.1.0-r1.ebuild)22
9 files changed, 15 insertions, 404 deletions
diff --git a/media-sound/wavpack/Manifest b/media-sound/wavpack/Manifest
index 228e5a35ad9d..23a93a08223e 100644
--- a/media-sound/wavpack/Manifest
+++ b/media-sound/wavpack/Manifest
@@ -1,10 +1,3 @@
-AUX wavpack-5.1.0-CVE-2018-10536-CVE-2018-10537.patch 2488 BLAKE2B cabb0741eff1df18c185cb7d2e4f3eb8cf7101a3dcac0bf8641d2cdc2ca5b0bb9d983edb47e7c92884878237994024e66be8aa48edf3b651b2bcb03a82a91cbd SHA512 58c7c4bc3475e88a1f997e879c2220da8b638100f3da20f169d1131f9827677118628e6e05f61fe55ae3e00cad63c318535f28d47185b72c174477bfde6823be
-AUX wavpack-5.1.0-CVE-2018-10538-CVE-2018-10539-CVE-2018-10540.patch 2664 BLAKE2B d11f2a15cbfd595f08b225ad322379bf1725cef280ae7fb516b8b57014e9c7da0f05d98bc82a80ddab1987671192a4ce69930bc39cc9cba5d2b26a600094d32d SHA512 1a469c5a36f037509951cc1afbd7b558434061d656c5f252350879c18ff31836c13dfbbaadff2bd075b5c6399b07c3b1e9ec80986cf44e0175e5c185a34680eb
-AUX wavpack-5.1.0-CVE-2018-6767.patch 5430 BLAKE2B 7131fbc90bddeec7fc2d4995685204e1506b142c4a442051119c20e47f97e3d484f3cf4fd4a138d999cfb2e0fdf27b0ac1aca87deee44cbe8a12bc8695853252 SHA512 f3ad6ac08e428dabd8c56de5bd430809378aaaf0ef846fd807b54cbe7637c1e42b75ff495c093dbbd4e3c0f5da3e3cbcaa69e8625059778acbd5682566d221dc
-AUX wavpack-5.1.0-CVE-2018-7253.patch 1299 BLAKE2B e2a40e2518208d143072a201ef5c8e187b1562d905639ceb13bc9fecc89dfcb5a8266bafa4f738d52abd606ada06037ddc94e916a436c3770aa77d398a26bdc9 SHA512 d00d47ea3a6141fb85402d68984ec1217b6f21c68c5de968488ce349e059d70b3d497902a7a6f1149eb61ec41f83182c53359ec2af738c7f5ba965d7a3b676f1
-AUX wavpack-5.1.0-CVE-2018-7254.patch 3004 BLAKE2B 2c744a5675a8b8c3f6b8e956ff3b65173a350f0aec90d8c4ae82eb558461016da1e89a485b2a8a67b5b76959cf579337e3f603de3a2f63c113d7f19a05f01b32 SHA512 cb83dd1767ee9759e14bac5eacf8b29cae3a2c22c326cd34bcc6d6941c0565c68d16a3d07e4c2b2f7a591284b8faf5b8697b4505e4bfd5e5e83f2a9de70df586
-AUX wavpack-5.1.0-armv7.patch 805 BLAKE2B dc69a643e3dde75cce1d5a23176cb09fecc513a98835242437659b0724de8ba2cb97a59fb1cb3dc050454ff95bc2669e6b19f10fd03fadaf06e4c859c063277c SHA512 b152f8081b712c24ae8db641f4755798ab4c7412a298054449883255fa76571ffbd0c580848a274ce1c44401f69102a0b2c66137ae36d9323e9e5330ee20856e
-AUX wavpack-5.1.0-memleaks.patch 800 BLAKE2B 601e81daad4208d109bd980cbe63ce0c638577d53fe01fa133469090faed7f641d00efd44f906732905599615513b0dddf918dc9ce13f927b3e889a1dbd0d13d SHA512 ac5f8473314939c1b07019617f8881e4675bab2d4a0f61dd95c5389ec9915a8573f3291a5c29547e8e5a300483600d36f3c53f9ee7380c5f0691860cef6a3594
-DIST wavpack-5.1.0.tar.bz2 824331 BLAKE2B 736dcb3cc0bee4ebcf76b8a7df178aa1b797ec6858358bf289a3e151f62d2ce8f430d163d46a84c0b5a7501c732ac639955c867e53fd9217ca7f213b601a8697 SHA512 4c31616ae63c3a875afa20f26ce935f7a8f9921e2892b4b8388eca3ccd83b2d686f43eed8b9ec1dead934a1148401b9dced3b05f509b7942c48d7af31cf80a54
-EBUILD wavpack-5.1.0-r1.ebuild 970 BLAKE2B 4d91995768fd6a3b2e4c4c356b3c853ccefc93b0a2ea7d5258a3040ad8b730138815ca0f0348a1a6b36dbe42dc5f01661be04f979642420d7dabef2083a9c410 SHA512 e4070df6f2ba1674ef45ee2f7730561c9f26fddfd9825868516e3c755190f9d04f8205a6f79ba3a53787d4e3b4762b958508708f6a6ef0efb9d5cc92a1eb5a5d
+DIST wavpack-5.3.2.tar.gz 2047344 BLAKE2B 621414f580ef0c6f71ec411cafba5e9d3f971c9ed3fa901d92083b803fb337ad5455c8f488cc985d2203fde56572adcd2899e5a5d6e07365248ef6bfd59b591b SHA512 cff46e000c2edf0124e2f4c9577611d029f124c235bf7811a58dbd5d87a02827d25f7bd0e28d2f05fd413ee9997ba48390acfc2a91ebb53885eb2a0423994a7b
+EBUILD wavpack-5.3.2.ebuild 1017 BLAKE2B c8effcd2e290fba0ae33eb1bdfa4a0db6ab7d9a4ffd66f08e6dfdda267ec867d3213188838b960f91fd9fb80608989cc1dd5d091c6b6620d6df8e8a0d0c0e046 SHA512 57ad228698c36bc29ac4a0569507b5893795dc45aa68c3775a3d8b72b8ed58be4259a3c50f5d4b0cf98bba8f9b93e6fb47031325c9f5a557e7b1360d5af439a5
MISC metadata.xml 253 BLAKE2B 6426153a5fa5bbad2aaffd28a6460f87a35678319768c57ac8dfae02b2229f6278dead4f564e6bc2bfd54d7143aed95c382abc2ee16c1073e9fbaf4f84cc0fef SHA512 78b724be3e1dbd6fc3c2e92cdbacc15ea4b0e8ee6fa22f76ebdd882b3a7bbedeaf8f80a29e36ec67e0432d2dfad3f57de4bc46480f92c8e544322755292df894
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10536-CVE-2018-10537.patch b/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10536-CVE-2018-10537.patch
deleted file mode 100644
index d8ac3552ddd5..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10536-CVE-2018-10537.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: David Bryant <david@wavpack.com>
-Date: Tue, 24 Apr 2018 22:18:07 -0700
-Subject: issue #30 issue #31 issue #32: no multiple format chunks in WAV or
- W64
-
----
- cli/riff.c | 7 ++++++-
- cli/wave64.c | 6 ++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-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) ||
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10538-CVE-2018-10539-CVE-2018-10540.patch b/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10538-CVE-2018-10539-CVE-2018-10540.patch
deleted file mode 100644
index d924bb624bdc..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-10538-CVE-2018-10539-CVE-2018-10540.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From: David Bryant <david@wavpack.com>
-Date: Tue, 24 Apr 2018 17:27:01 -0700
-Subject: issue #33, sanitize size of unknown chunks before malloc()
-
----
- cli/dsdiff.c | 9 ++++++++-
- cli/riff.c | 9 ++++++++-
- cli/wave64.c | 9 ++++++++-
- 3 files changed, 24 insertions(+), 3 deletions(-)
-
-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",
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-6767.patch b/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-6767.patch
deleted file mode 100644
index aa2cdd40fb62..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-6767.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From: David Bryant <david@wavpack.com>
-Date: Sun, 4 Feb 2018 11:28:15 -0800
-Subject: issue #27, do not overwrite stack on corrupt RF64 file
-
----
- cli/riff.c | 39 ++++++++++++++++++++++++++++++++-------
- 1 file changed, 32 insertions(+), 7 deletions(-)
-
-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)) {
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7253.patch b/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7253.patch
deleted file mode 100644
index 2bf554d8b525..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7253.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: David Bryant <david@wavpack.com>
-Date: Sat, 10 Feb 2018 16:01:39 -0800
-Subject: issue #28, do not overwrite heap on corrupt DSDIFF file
-
----
- cli/dsdiff.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-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) {
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7254.patch b/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7254.patch
deleted file mode 100644
index f6e1cc42b134..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-CVE-2018-7254.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From: David Bryant <david@wavpack.com>
-Date: Sun, 11 Feb 2018 16:37:47 -0800
-Subject: issue #28, fix buffer overflows and bad allocs on corrupt CAF files
-
----
- cli/caff.c | 30 +++++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 7 deletions(-)
-
-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",
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-armv7.patch b/media-sound/wavpack/files/wavpack-5.1.0-armv7.patch
deleted file mode 100644
index f6e6f66280fa..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-armv7.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-ARM asm is armv7 only in wavpack. Restrict based on host cpu.
-https://bugs.gentoo.org/show_bug.cgi?id=609168
-
-Upstream PR:
-https://github.com/dbry/WavPack/pull/20
-
-Index: wavpack-5.1.0/configure.ac
-===================================================================
---- wavpack-5.1.0.orig/configure.ac
-+++ wavpack-5.1.0/configure.ac
-@@ -159,7 +159,7 @@ AS_IF([test "x$enable_asm" != "xno"],[
- AS_CASE([$host_cpu],
- [i386|i486|i586|i686|i786], [AC_DEFINE([OPT_ASM_X86]) asm_selected=x86],
- [x86_64], [AC_DEFINE([OPT_ASM_X64]) asm_selected=x64],
-- [arm*], [AC_DEFINE([OPT_ASM_ARM]) asm_selected=arm],
-+ [armv7*], [AC_DEFINE([OPT_ASM_ARM]) asm_selected=arm],
- [AS_IF([test "x$enable_asm" = "xyes"],[AC_MSG_ERROR(no assembly code for CPU $host_cpu)])]
- )
- AC_MSG_RESULT($asm_selected)
diff --git a/media-sound/wavpack/files/wavpack-5.1.0-memleaks.patch b/media-sound/wavpack/files/wavpack-5.1.0-memleaks.patch
deleted file mode 100644
index 18f782fa7721..000000000000
--- a/media-sound/wavpack/files/wavpack-5.1.0-memleaks.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: David Bryant <david@wavpack.com>
-Date: Sun, 8 Apr 2018 16:27:40 -0700
-Subject: fix memory leaks
-
----
- src/common_utils.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/src/common_utils.c b/src/common_utils.c
-index caf6b8f..629e60e 100644
---- a/src/common_utils.c
-+++ b/src/common_utils.c
-@@ -373,6 +373,19 @@ WavpackContext *WavpackCloseFile (WavpackContext *wpc)
-
- WavpackFreeWrapper (wpc);
-
-+ if (wpc->metadata) {
-+ int i;
-+
-+ for (i = 0; i < wpc->metacount; ++i)
-+ if (wpc->metadata [i].data)
-+ free (wpc->metadata [i].data);
-+
-+ free (wpc->metadata);
-+ }
-+
-+ if (wpc->channel_identities)
-+ free (wpc->channel_identities);
-+
- if (wpc->channel_reordering)
- free (wpc->channel_reordering);
-
diff --git a/media-sound/wavpack/wavpack-5.1.0-r1.ebuild b/media-sound/wavpack/wavpack-5.3.2.ebuild
index b0bce8e71976..33880cc9703d 100644
--- a/media-sound/wavpack/wavpack-5.1.0-r1.ebuild
+++ b/media-sound/wavpack/wavpack-5.3.2.ebuild
@@ -5,24 +5,23 @@ EAPI=7
inherit autotools multilib-minimal
+# Need to fetch a commit because upstream didn't tag the minor release
+COMMIT="e4e8d191e8dd74cbdbeaef3232c16a7ef517e68d"
+
DESCRIPTION="Hybrid lossless audio compression tools"
-HOMEPAGE="http://www.wavpack.com/"
-SRC_URI="http://www.wavpack.com/${P}.tar.bz2"
+HOMEPAGE="https://www.wavpack.com/"
+SRC_URI="https://github.com/dbry/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
RDEPEND=">=virtual/libiconv-0-r1"
DEPEND="${RDEPEND}"
-PATCHES=(
- "${FILESDIR}"/${P}-armv7.patch
- "${FILESDIR}"/${P}-CVE-2018-{6767,7253,7254}.patch
- "${FILESDIR}"/${P}-CVE-2018-10536-CVE-2018-10537.patch
- "${FILESDIR}"/${P}-CVE-2018-10538-CVE-2018-10539-CVE-2018-10540.patch
- "${FILESDIR}"/${P}-memleaks.patch
-)
+S="${WORKDIR}/WavPack-${COMMIT}"
src_prepare() {
default
@@ -32,9 +31,14 @@ src_prepare() {
multilib_src_configure() {
ECONF_SOURCE=${S} econf \
--disable-static \
+ $(use_enable test tests) \
$(multilib_native_enable apps)
}
+multilib_src_test() {
+ cli/wvtest --default
+}
+
multilib_src_install_all() {
einstalldocs
find "${D}" -name '*.la' -delete || die