diff options
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/bluez-CVE-2017-1000250.patch | 42 | ||||
-rw-r--r-- | gnu/packages/patches/gd-fix-gd2-read-test.patch | 14 | ||||
-rw-r--r-- | gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch | 121 | ||||
-rw-r--r-- | gnu/packages/patches/gdk-pixbuf-list-dir.patch | 35 | ||||
-rw-r--r-- | gnu/packages/patches/mesa-skip-disk-cache-test.patch | 6 |
5 files changed, 3 insertions, 215 deletions
diff --git a/gnu/packages/patches/bluez-CVE-2017-1000250.patch b/gnu/packages/patches/bluez-CVE-2017-1000250.patch deleted file mode 100644 index 81f209d7b2..0000000000 --- a/gnu/packages/patches/bluez-CVE-2017-1000250.patch +++ /dev/null @@ -1,42 +0,0 @@ -Description: CVE-2017-1000250: information disclosure vulnerability in service_search_attr_req -Origin: vendor -Bug-Debian: https://bugs.debian.org/875633 -Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1489446 -Bug-SuSE: https://bugzilla.suse.com/show_bug.cgi?id=1057342 -Forwarded: no -Author: Armis Security <security@armis.com> -Reviewed-by: Salvatore Bonaccorso <carnil@debian.org> -Last-Update: 2017-09-13 - ---- a/src/sdpd-request.c -+++ b/src/sdpd-request.c -@@ -918,15 +918,20 @@ static int service_search_attr_req(sdp_r - /* continuation State exists -> get from cache */ - sdp_buf_t *pCache = sdp_get_cached_rsp(cstate); - if (pCache) { -- uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent); -- pResponse = pCache->data; -- memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent); -- buf->data_size += sent; -- cstate->cStateValue.maxBytesSent += sent; -- if (cstate->cStateValue.maxBytesSent == pCache->data_size) -- cstate_size = sdp_set_cstate_pdu(buf, NULL); -- else -- cstate_size = sdp_set_cstate_pdu(buf, cstate); -+ if (cstate->cStateValue.maxBytesSent >= pCache->data_size) { -+ status = SDP_INVALID_CSTATE; -+ SDPDBG("Got bad cstate with invalid size"); -+ } else { -+ uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent); -+ pResponse = pCache->data; -+ memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent); -+ buf->data_size += sent; -+ cstate->cStateValue.maxBytesSent += sent; -+ if (cstate->cStateValue.maxBytesSent == pCache->data_size) -+ cstate_size = sdp_set_cstate_pdu(buf, NULL); -+ else -+ cstate_size = sdp_set_cstate_pdu(buf, cstate); -+ } - } else { - status = SDP_INVALID_CSTATE; - SDPDBG("Non-null continuation state, but null cache buffer"); diff --git a/gnu/packages/patches/gd-fix-gd2-read-test.patch b/gnu/packages/patches/gd-fix-gd2-read-test.patch deleted file mode 100644 index 65f39e4426..0000000000 --- a/gnu/packages/patches/gd-fix-gd2-read-test.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fix a 'maybe-uninitialized' warning (turned error) -which occurs on non-Intel platforms. - ---- libgd-2.2.3/tests/gd2/gd2_read.c 2016-07-21 01:21:16.000000000 -0400 -+++ libgd-2.2.3/tests/gd2/gd2_read.c 2016-07-29 15:52:03.806405312 -0400 -@@ -5,7 +5,7 @@ - - int main(int argc, char *argv[]) - { -- int error, i = 0; -+ int error = 0, i = 0; - gdImagePtr im, exp; - FILE *fp; - char *path[] = { diff --git a/gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch b/gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch deleted file mode 100644 index a926c1455c..0000000000 --- a/gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch +++ /dev/null @@ -1,121 +0,0 @@ -This bug was first reported to php on https://bugs.php.net/bug.php?id=73968. -php then reported it to gd in https://github.com/libgd/libgd/issues/109. - -Patch adapted from upstream source repository: - -https://github.com/libgd/libgd/commit/082c5444838ea0d84f9fb6441aefdb44d78d9bba - -Binary diffs have been removed from the patch because our patch -procedure doesn't support them. - -From 082c5444838ea0d84f9fb6441aefdb44d78d9bba Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" <cmbecker69@gmx.de> -Date: Fri, 20 Jan 2017 22:48:20 +0100 -Subject: [PATCH] Fix #109: XBM reading fails with printed error - -When calculating the number of required bytes of an XBM image, we have -to take the line padding into account. ---- - src/gd_xbm.c | 2 +- - tests/xbm/CMakeLists.txt | 1 + - tests/xbm/Makemodule.am | 5 ++++- - tests/xbm/github_bug_109.c | 35 +++++++++++++++++++++++++++++++++++ - tests/xbm/github_bug_109.xbm | 5 +++++ - 5 files changed, 47 insertions(+), 2 deletions(-) - create mode 100644 tests/xbm/github_bug_109.c - create mode 100644 tests/xbm/github_bug_109.xbm - create mode 100644 tests/xbm/github_bug_109_exp.png - -diff --git a/src/gd_xbm.c b/src/gd_xbm.c -index 5f09b56..c2ba2ad 100644 ---- a/src/gd_xbm.c -+++ b/src/gd_xbm.c -@@ -108,7 +108,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm(FILE * fd) - max_bit = 32768; - } - if (max_bit) { -- bytes = (width * height / 8) + 1; -+ bytes = (width + 7) / 8 * height; - if (!bytes) { - return 0; - } -diff --git a/tests/xbm/CMakeLists.txt b/tests/xbm/CMakeLists.txt -index 183cf5e..08576e0 100644 ---- a/tests/xbm/CMakeLists.txt -+++ b/tests/xbm/CMakeLists.txt -@@ -1,4 +1,5 @@ - LIST(APPEND TESTS_FILES -+ github_bug_109 - github_bug_170 - ) - -diff --git a/tests/xbm/Makemodule.am b/tests/xbm/Makemodule.am -index ba1eabd..0f5beb6 100644 ---- a/tests/xbm/Makemodule.am -+++ b/tests/xbm/Makemodule.am -@@ -1,5 +1,8 @@ - libgd_test_programs += \ -+ xbm/github_bug_109 \ - xbm/github_bug_170 - - EXTRA_DIST += \ -- xbm/CMakeLists.txt -+ xbm/CMakeLists.txt \ -+ xbm/github_bug_109.xbm \ -+ xbm/github_bug_109_exp.png -diff --git a/tests/xbm/github_bug_109.c b/tests/xbm/github_bug_109.c -new file mode 100644 -index 0000000..1a020c6 ---- /dev/null -+++ b/tests/xbm/github_bug_109.c -@@ -0,0 +1,35 @@ -+/** -+ * Test reading of XBM images with a width that is not a multiple of 8 -+ * -+ * We're reading such an XBM image, and check that we got what we've expected, -+ * instead of an error message. -+ * -+ * See also <https://github.com/libgd/libgd/issues/109>. -+ */ -+ -+ -+#include "gd.h" -+#include "gdtest.h" -+ -+ -+int main() -+{ -+ gdImagePtr im; -+ FILE *fp; -+ char *path; -+ -+ fp = gdTestFileOpen2("xbm", "github_bug_109.xbm"); -+ im = gdImageCreateFromXbm(fp); -+ fclose(fp); -+ gdTestAssert(im != NULL); -+ gdTestAssert(gdImageGetTrueColorPixel(im, 0, 0) == 0); -+ gdTestAssert(gdImageGetTrueColorPixel(im, 0, 1) == 0xffffff); -+ -+ path = gdTestFilePath2("xbm", "github_bug_109_exp.png"); -+ gdAssertImageEqualsToFile(path, im); -+ gdFree(path); -+ -+ gdImageDestroy(im); -+ -+ return gdNumFailures(); -+} -diff --git a/tests/xbm/github_bug_109.xbm b/tests/xbm/github_bug_109.xbm -new file mode 100644 -index 0000000..f427d86 ---- /dev/null -+++ b/tests/xbm/github_bug_109.xbm -@@ -0,0 +1,5 @@ -+#define test_width 10 -+#define test_height 10 -+static unsigned char test_bits[] = { -+ 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, -+ 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00}; - --- -2.7.4 - diff --git a/gnu/packages/patches/gdk-pixbuf-list-dir.patch b/gnu/packages/patches/gdk-pixbuf-list-dir.patch deleted file mode 100644 index 137914a19c..0000000000 --- a/gnu/packages/patches/gdk-pixbuf-list-dir.patch +++ /dev/null @@ -1,35 +0,0 @@ -Sort directory entries so that the output of -‘gdk-pixbuf-query-loaders’ is deterministic. - -See: https://bugzilla.gnome.org/show_bug.cgi?id=777332 ---- gdk-pixbuf-2.34.0/gdk-pixbuf/queryloaders.c.orig 2017-01-11 00:17:32.865843062 +0100 -+++ gdk-pixbuf-2.34.0/gdk-pixbuf/queryloaders.c 2017-01-16 16:12:03.420667874 +0100 -@@ -354,16 +354,27 @@ - - dir = g_dir_open (path, 0, NULL); - if (dir) { -+ GList *entries = NULL; - const char *dent; - - while ((dent = g_dir_read_name (dir))) { - gint len = strlen (dent); - if (len > SOEXT_LEN && - strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) { -- query_module (contents, path, dent); -+ entries = g_list_append (entries, g_strdup (dent)); - } - } - g_dir_close (dir); -+ /* Sort directory entries so that the output of -+ ‘gdk-pixbuf-query-loaders’ is deterministic. */ -+ entries = g_list_sort (entries, (GCompareFunc) strcmp); -+ GList *xentries; -+ for (xentries = entries; xentries; xentries = g_list_next (xentries)) { -+ dent = xentries->data; -+ query_module (contents, path, dent); -+ g_free (xentries->data); -+ } -+ g_list_free (entries); - } - #else - g_string_append_printf (contents, "# dynamic loading of modules not supported\n"); diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch index b3f9367fd5..190f6b6ee1 100644 --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch +++ b/gnu/packages/patches/mesa-skip-disk-cache-test.patch @@ -8,12 +8,12 @@ for now. @@ -170,11 +170,6 @@ unsetenv("MESA_GLSL_CACHE_DIR"); unsetenv("XDG_CACHE_HOME"); - -- cache = disk_cache_create("test", "make_check"); + +- cache = disk_cache_create("test", "make_check", 0); - expect_non_null(cache, "disk_cache_create with no environment variables"); - - disk_cache_destroy(cache); - /* Test with XDG_CACHE_HOME set */ setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); - cache = disk_cache_create("test", "make_check"); + cache = disk_cache_create("test", "make_check", 0); |