From 12347e90669d7fb88b65e1f2f2963c4210f611b7 Mon Sep 17 00:00:00 2001 From: tTh Date: Sun, 8 Oct 2023 07:28:57 +0200 Subject: [PATCH] add a molly guard --- funcs/dithering.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/funcs/dithering.c b/funcs/dithering.c index e11c5b8..9144e98 100644 --- a/funcs/dithering.c +++ b/funcs/dithering.c @@ -23,6 +23,11 @@ fprintf(stderr, ">>> %s ( %p %p 0x%04x )\n", __func__, psrc, pdst, flags); if (flags) { fprintf(stderr, "flags: 0x%04x in %s\n", flags, __func__); } +if (fimg_images_not_compatible(psrc, pdst)) { + fprintf(stderr, "%s: shit happen\n", __func__); + return -2; + } + for (y=0; yheight; y++) { for (x=0; xwidth; x++)