summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2017-07-26 16:36:58 +0200
committerBastien Nocera <hadess@hadess.net>2017-07-26 16:38:30 +0200
commit86fedf6383d025685edb5bc1dfa45e0420232cb0 (patch)
tree59287f8764ca329422607a62c87772d4f1cb819b
parent92d2d98c28e26496ceb8a4a825a061a25b1cdf5b (diff)
downloadgdk-pixbuf-86fedf6383d025685edb5bc1dfa45e0420232cb0.tar.gz
tests: Fix CVE-2015-4491 test
The sanity checks for image dimensions have since been tightened in commit 4154d4f and we should not be able to open this huge image anymore as the dimensions exceed what's possible.
-rw-r--r--tests/cve-2015-4491.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/cve-2015-4491.c b/tests/cve-2015-4491.c
index 988cb495d..f5454d0a7 100644
--- a/tests/cve-2015-4491.c
+++ b/tests/cve-2015-4491.c
@@ -30,12 +30,8 @@ test_original (void)
GError* err = NULL;
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;
-
- g_assert_no_error (err);
-
- g_object_unref (buf);
+ /* Image is corrupt because the rowstride * height mul overflows */
+ g_assert_error (err, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE);
}
static void