From 18358ed541e1aea20b6be18b51c587bd35fdabc6 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Wed, 15 Dec 2021 16:49:00 +0100 Subject: [PATCH] ImageViewer: Fix gifs sporadically crashing on targets ensure 32bit alignment Change-Id: I11e0df599403a888fa63dab8f1c5a94a5f35d9ad --- apps/plugins/imageviewer/gif/gif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/plugins/imageviewer/gif/gif.c b/apps/plugins/imageviewer/gif/gif.c index 32c87c88d9..b78709556d 100644 --- a/apps/plugins/imageviewer/gif/gif.c +++ b/apps/plugins/imageviewer/gif/gif.c @@ -72,7 +72,7 @@ static void draw_image_rect(struct image_info *info, static int img_mem(int ds) { struct gif_decoder *p_decoder = &decoder; - return p_decoder->native_img_size/ds; + return (p_decoder->native_img_size/ds + 3) & ~3; } static int load_image(char *filename, struct image_info *info,