login

<     >

2017-11-12 16:01:46 (UTC-02:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Read extra bytes and END BLOCK after image data.

diff --git a/gifdec.c b/gifdec.c
index 06824de..9ca8483 100644
--- a/gifdec.c
+++ b/gifdec.c
@@ -308,6 +308,8 @@ read_image_data(gd_GIF *gif, uint16_t x, uint16_t y, uint16_t w)
             table->entries[table->nentries - 1].suffix = entry.suffix;
     }
     free(table);
+    lseek(gif->fd, sub_len, SEEK_CUR);
+    read(gif->fd, &sub_len, 1); /* Must be zero! */
     return 0;
 }