summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-12-21 23:10:51 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-12-21 23:10:51 +0000
commit6a3479037a6c50d67e312481b22ebb7bbc9a7d88 (patch)
treeb810d203cd9dcf338a21073225ad2c9e4bd05afe /gdk-pixbuf
parentf135f99ce08c8d94422263337fbdf49b2800d60f (diff)
downloadgdk-pixbuf-6a3479037a6c50d67e312481b22ebb7bbc9a7d88.tar.gz
Handle invalid gif animations a little bit more robustly. (#357974,
2006-12-21 Matthias Clasen <mclasen@redhat.com> * io-gif.c (gif_get_lzw): Handle invalid gif animations a little bit more robustly. (#357974, Vassilis Pandis, patch by Felix Riemann)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog4
-rw-r--r--gdk-pixbuf/io-gif.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index f2679bcc2..5f8c6da54 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,5 +1,9 @@
2006-12-21 Matthias Clasen <mclasen@redhat.com>
+ * io-gif.c (gif_get_lzw): Handle invalid gif animations
+ a little bit more robustly. (#357974, Vassilis Pandis,
+ patch by Felix Riemann)
+
* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
* gdk-pixbuf.c (gdk_pixbuf_new): Remove redundant size
checks, and document that width, height must be > 0.
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index 74fab8cc6..30da2cbfc 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -908,6 +908,11 @@ gif_get_lzw (GifContext *context)
/* Only call prepare_func for the first frame */
if (context->animation->frames->next == NULL) {
+ if (context->animation->width == 0 )
+ context->animation->width = gdk_pixbuf_get_width(context->frame->pixbuf);
+ if (context->animation->height == 0)
+ context->animation->height = gdk_pixbuf_get_height (context->frame->pixbuf);
+
if (context->prepare_func)
(* context->prepare_func) (context->frame->pixbuf,
GDK_PIXBUF_ANIMATION (context->animation),