From 1024e92fc5c48734084b01cbf555ffdfb90825ee Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 5 Feb 2023 14:10:45 -0500 Subject: [PATCH] improve decompression errors --- coders/wpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/wpg.c b/coders/wpg.c index 956c46d80f..f190dfac53 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -705,7 +705,7 @@ static int UnpackWPG2Raster(Image *image,int bpp) break; } BImgBuff=(unsigned char *) RelinquishMagickMemory(BImgBuff); - return(0); + return(y < (ssize_t) image->rows ? -5 : 0); }