[gdk-pixbuf] gif: Fix loading GIF if first write is smaller than 13 bytes



commit 692b0ceaf032be2cd2558396c2b74a64869048d5
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 24 12:34:22 2014 +0200

    gif: Fix loading GIF if first write is smaller than 13 bytes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=581461

 gdk-pixbuf/io-gif.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index 29d2759..e3e2d84 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -1456,7 +1456,8 @@ new_context (void)
        context->update_func = NULL;
        context->user_data = NULL;
        context->buf = NULL;
-       context->amount_needed = 0;
+       context->amount_needed = 13;
+       context->buf = g_new (guchar, context->amount_needed);
        context->gif89.transparent = -1;
        context->gif89.delay_time = -1;
        context->gif89.input_flag = -1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]