From f38d28f4bf32e2724fc0f0e73210161e6bf262f2 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 13:50:04 +0000 Subject: Apply patch gd-2.2.5-upstream.patch patch_name: gd-2.2.5-upstream.patch present_in_specfile: true --- diff --git a/src/gd_gif_in.c b/src/gd_gif_in.c index c195448..db4a973 100755 --- a/src/gd_gif_in.c +++ b/src/gd_gif_in.c @@ -335,11 +335,6 @@ terminated: return 0; } - if(!im->colorsTotal) { - gdImageDestroy(im); - return 0; - } - /* Check for open colors at the end, so * we can reduce colorsTotal and ultimately * BitsPerPixel */ @@ -351,6 +346,11 @@ terminated: } } + if(!im->colorsTotal) { + gdImageDestroy(im); + return 0; + } + return im; } @@ -447,7 +447,7 @@ static int GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) { int i, j, ret; - unsigned char count; + int count; if(flag) { scd->curbit = 0;