summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-12-21 23:27:01 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-12-21 23:27:01 +0000
commitf750eb2f173b0e870d3020cc105e50e380096c70 (patch)
tree7720d5c8b030e25f626e74bed877066d36d3cb47 /gdk-pixbuf
parent0f1bed1d74cfa48892f82e637f4dbeed7e12417d (diff)
downloadgdk-pixbuf-f750eb2f173b0e870d3020cc105e50e380096c70.tar.gz
Handle invalid gif animations a little bit more robustly. (#357974,
* 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 fc9901034..7bc8e5826 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 004aa484e..5459424b1 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),