diff --git a/.gitlab-ci/fedora-base.Dockerfile b/.gitlab-ci/fedora-base.Dockerfile index 0237b3804b..c9e428d54c 100644 --- a/.gitlab-ci/fedora-base.Dockerfile +++ b/.gitlab-ci/fedora-base.Dockerfile @@ -41,6 +41,7 @@ RUN dnf -y install \ itstool \ json-glib-devel \ lcov \ + libasan \ libattr-devel \ libepoxy-devel \ libffi-devel \ diff --git a/testsuite/gdk/memorytexture.c b/testsuite/gdk/memorytexture.c index b43281e6b2..3f941cdb29 100644 --- a/testsuite/gdk/memorytexture.c +++ b/testsuite/gdk/memorytexture.c @@ -93,7 +93,7 @@ create_texture (GdkMemoryFormat format, guchar *data; int x, y; - data = g_malloc (height * stride); + data = g_malloc (height * MAX (stride, tests[format].bytes_per_pixel)); for (y = 0; y < height; y++) for (x = 0; x < width; x++) { @@ -102,7 +102,7 @@ create_texture (GdkMemoryFormat format, tests[format].bytes_per_pixel); } - bytes = g_bytes_new_static (data, height * stride); + bytes = g_bytes_new_static (data, height * MAX (stride, tests[format].bytes_per_pixel)); texture = gdk_memory_texture_new (width, height, format, bytes,