From 9838c9f65fd77bc69ea15fea4c440c2dcf7cc688 Mon Sep 17 00:00:00 2001 From: Anders Jonsson Date: Sun, 14 Jan 2024 21:12:32 +0100 Subject: [PATCH] plug-ins: fix crash on export to xmc Fixes #10605. Export to xmc when image width or height is 256 pixels causes a crash. Add equality check to an assert to stop the plug-in from crashing. --- plug-ins/common/file-xmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c index f140aa2336..f2acf51a93 100644 --- a/plug-ins/common/file-xmc.c +++ b/plug-ins/common/file-xmc.c @@ -1569,7 +1569,7 @@ save_image (GFile *file, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE); /*convert pixel date to XcursorPixel. */ - g_assert (save_rgn.width * save_rgn.height < SQR (MAX_SAVE_DIMENSION)); + g_assert (save_rgn.width * save_rgn.height <= SQR (MAX_SAVE_DIMENSION)); for (j = 0; j < save_rgn.width * save_rgn.height; j++) { imagesp->images[i]->pixels[j] = premultiply_alpha (pixelbuf[j]);