From 11f87d635ce73f7d69ed4b1bdca77df1a7406eb5 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 12 Jan 2020 18:46:40 +0100 Subject: gnu: jsoncpp: Fix test failure on armhf-linux and aarch64-linux. * gnu/packages/patches/jsoncpp-fix-inverted-case.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/serialization.scm (jsoncpp)[source](patches): New field. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 33cf439870..aa61799f06 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1030,6 +1030,7 @@ dist_patch_DATA = \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/jfsutils-add-sysmacros.patch \ %D%/packages/patches/jfsutils-include-systypes.patch \ + %D%/packages/patches/jsoncpp-fix-inverted-case.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch \ %D%/packages/patches/libvirt-create-machine-cgroup.patch \ -- cgit v1.2.3 From 638c45eda8ee77a3a4c25a1ec3df2efa5d2776df Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 12 Jan 2020 19:10:27 +0100 Subject: gnu: wavpack: Update to 5.2.0. * gnu/packages/patches/wavpack-CVE-2018-6767.patch, gnu/packages/patches/wavpack-CVE-2018-7253.patch, gnu/packages/patches/wavpack-CVE-2018-7254.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/audio.scm (wavpack): Update to 5.2.0. [source](patches): Remove. --- gnu/local.mk | 3 - gnu/packages/audio.scm | 9 +- gnu/packages/patches/wavpack-CVE-2018-6767.patch | 119 ----------------------- gnu/packages/patches/wavpack-CVE-2018-7253.patch | 29 ------ gnu/packages/patches/wavpack-CVE-2018-7254.patch | 62 ------------ 5 files changed, 3 insertions(+), 219 deletions(-) delete mode 100644 gnu/packages/patches/wavpack-CVE-2018-6767.patch delete mode 100644 gnu/packages/patches/wavpack-CVE-2018-7253.patch delete mode 100644 gnu/packages/patches/wavpack-CVE-2018-7254.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index aa61799f06..9dd67ddd5c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1457,9 +1457,6 @@ dist_patch_DATA = \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ - %D%/packages/patches/wavpack-CVE-2018-6767.patch \ - %D%/packages/patches/wavpack-CVE-2018-7253.patch \ - %D%/packages/patches/wavpack-CVE-2018-7254.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 247a415307..1d2df21dc0 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -2675,17 +2675,14 @@ stretching and pitch scaling of audio. This package contains the library.") (define-public wavpack (package (name "wavpack") - (version "5.1.0") + (version "5.2.0") (source (origin (method url-fetch) (uri (string-append "http://www.wavpack.com/" - name "-" version ".tar.bz2")) - (patches (search-patches "wavpack-CVE-2018-6767.patch" - "wavpack-CVE-2018-7253.patch" - "wavpack-CVE-2018-7254.patch")) + "wavpack-" version ".tar.xz")) (sha256 (base32 - "0i19c6krc0p9krwrqy9s5xahaafigqzxcn31piidmlaqadyn4f8r")))) + "1qvpvfx30kvrkw7y1g6r8xj109wszg1z0qmkfm17wf3flb7v3rbp")))) (build-system gnu-build-system) (home-page "http://www.wavpack.com/") (synopsis "Hybrid lossless audio codec") diff --git a/gnu/packages/patches/wavpack-CVE-2018-6767.patch b/gnu/packages/patches/wavpack-CVE-2018-6767.patch deleted file mode 100644 index f49a8f0fd6..0000000000 --- a/gnu/packages/patches/wavpack-CVE-2018-6767.patch +++ /dev/null @@ -1,119 +0,0 @@ -Fix CVE-2018-6767: -https://nvd.nist.gov/vuln/detail/CVE-2018-6767 -https://security-tracker.debian.org/tracker/CVE-2018-6767 - -Patch copied from upstream source repository: -https://github.com/dbry/WavPack/commit/d5bf76b5a88d044a1be1d5656698e3ba737167e5 - -From d5bf76b5a88d044a1be1d5656698e3ba737167e5 Mon Sep 17 00:00:00 2001 -From: David Bryant -Date: Sun, 4 Feb 2018 11:28:15 -0800 -Subject: [PATCH] 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/gnu/packages/patches/wavpack-CVE-2018-7253.patch b/gnu/packages/patches/wavpack-CVE-2018-7253.patch deleted file mode 100644 index 651755afd0..0000000000 --- a/gnu/packages/patches/wavpack-CVE-2018-7253.patch +++ /dev/null @@ -1,29 +0,0 @@ -Fix CVE-2018-7253: -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7253 - -Copied from upstream: -https://github.com/dbry/WavPack/commit/36a24c7881427d2e1e4dc1cef58f19eee0d13aec - -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/gnu/packages/patches/wavpack-CVE-2018-7254.patch b/gnu/packages/patches/wavpack-CVE-2018-7254.patch deleted file mode 100644 index 61db296ec8..0000000000 --- a/gnu/packages/patches/wavpack-CVE-2018-7254.patch +++ /dev/null @@ -1,62 +0,0 @@ -Fix CVE-2018-7254: -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7254 - -Copied from upstream: -https://github.com/dbry/WavPack/commit/8e3fe45a7bac31d9a3b558ae0079e2d92a04799e - -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", -- cgit v1.2.3 From 20eb3b7e747b25f5d2c85167158353cc74e09e41 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 12 Jan 2020 21:39:09 +0100 Subject: gnu: spice: Fix test failure on armhf-linux. * gnu/packages/patches/spice-fix-test-armhf.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/spice.scm (spice)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/patches/spice-fix-test-armhf.patch | 19 +++++++++++++++++++ gnu/packages/spice.scm | 1 + 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/spice-fix-test-armhf.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9dd67ddd5c..cb46ee7880 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1382,6 +1382,7 @@ dist_patch_DATA = \ %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ %D%/packages/patches/soundconverter-remove-gconf-dependency.patch \ + %D%/packages/patches/spice-fix-test-armhf.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/supercollider-boost-1.70-build-fix.patch \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ diff --git a/gnu/packages/patches/spice-fix-test-armhf.patch b/gnu/packages/patches/spice-fix-test-armhf.patch new file mode 100644 index 0000000000..5c51bd6ede --- /dev/null +++ b/gnu/packages/patches/spice-fix-test-armhf.patch @@ -0,0 +1,19 @@ +Fix test failure on armhf and ppc64el: +https://gitlab.freedesktop.org/spice/spice-server/issues/31 + +Taken from upstream: +https://gitlab.freedesktop.org/spice/spice/commit/19f9f454e0777d851f26d14df0c7984267c57015 + +diff --git a/server/tests/test-qxl-parsing.c b/server/tests/test-qxl-parsing.c +index 60ca8f88c62441e02577ced21e4f60a08ad4171a..234bdabc9ce619d0799b5136f1d72357b0b2f490 100644 +--- a/server/tests/test-qxl-parsing.c ++++ b/server/tests/test-qxl-parsing.c +@@ -96,7 +96,7 @@ static void test_memslot_invalid_slot_id(void) + RedMemSlotInfo mem_info; + init_meminfo(&mem_info); + +- memslot_get_virt(&mem_info, 1 << mem_info.memslot_id_shift, 16, 0); ++ memslot_get_virt(&mem_info, UINT64_C(1) << mem_info.memslot_id_shift, 16, 0); + } + + static void test_memslot_invalid_addresses(void) diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm index edc6135fbd..a57e0151ca 100644 --- a/gnu/packages/spice.scm +++ b/gnu/packages/spice.scm @@ -197,6 +197,7 @@ which allows users to view a desktop computing environment.") (uri (string-append "https://www.spice-space.org/download/releases/" "spice-server/spice-" version ".tar.bz2")) + (patches (search-patches "spice-fix-test-armhf.patch")) (sha256 (base32 "19r999py9v9c7md2bb8ysj809ag1hh6djl1ik8jcgx065s4b60xj")))) -- cgit v1.2.3