From b643695786a4d0268ccc7a3b17b277ac0a4e224a Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Tue, 15 Jun 2010 16:52:59 +0000 Subject: [PATCH] Fix issue 357: Program hangs when loading GIF images with unknown Application Extension Blocks git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1507 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/fileformats.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/fileformats.c b/src/fileformats.c index daed68fc..f69b0814 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -1937,6 +1937,16 @@ void Load_GIF(T_IO_Context * context) } } } + else + { + // Unknown extension, skip. + Read_byte(GIF_file,&size_to_read); + while (size_to_read!=0 && !File_error) + { + fseek(GIF_file,size_to_read,SEEK_CUR); + Read_byte(GIF_file,&size_to_read); + } + } } else {