From 86fedf6383d025685edb5bc1dfa45e0420232cb0 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 26 Jul 2017 16:36:58 +0200 Subject: 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. --- tests/cve-2015-4491.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests') 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 -- cgit v1.2.1