Package: gdk-pixbuf / 2.36.5-2+deb9u2

0001-skip-perturb-for-cve-2015-4491-original-test.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 2618753a5cbfc848255cac1590127be4ea234f1f Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <xnox@ubuntu.com>
Date: Fri, 15 Apr 2016 10:20:00 +0000
Subject: [PATCH] skip-perturb-for-cve-2015-4491-original-test.patch

(Taken from https://bugzilla.gnome.org/show_bug.cgi?id=765094 - although it's
rejected there as the OOM should be fixed / the error reported properly.)

---
 tests/cve-2015-4491.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/cve-2015-4491.c b/tests/cve-2015-4491.c
index 988cb495d..62add04b6 100644
--- a/tests/cve-2015-4491.c
+++ b/tests/cve-2015-4491.c
@@ -18,6 +18,8 @@
  * Author: Benjamin Otte
  */
 
+#include <malloc.h>
+
 #include <gdk-pixbuf.h>
 
 #include "test-common.h"
@@ -28,11 +30,23 @@ test_original (void)
   GdkPixbuf* buf;
   int size = 32;
   GError* err = NULL;
+  gint64 perturbv = 0;
+
+  const gchar * perturb = NULL;
+  perturb = g_getenv("MALLOC_PERTURB_");
+  if (perturb != NULL) {
+	  perturbv = g_ascii_strtoll (perturb, NULL, 0);
+	  mallopt(M_PERTURB, 0);
+  }
 
   buf = gdk_pixbuf_new_from_resource_at_scale ("/test/resource/cve-2015-4491.bmp", size, size, FALSE, &err);
   if (skip_if_insufficient_memory (&err))
     return;
 
+  if (perturbv > 0) {
+	  mallopt(M_PERTURB, perturbv);
+  }
+
   g_assert_no_error (err);
 
   g_object_unref (buf);
-- 
2.11.0