From e3bf16ec14edb14dd0f2f4ce04040a7705db671d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 12 Oct 2005 13:49:26 +0000 Subject: [PATCH] Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589, 2005-10-12 Matthias Clasen * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589, Bogdan Nicula) --- gdk-pixbuf/ChangeLog | 6 ++++++ gdk-pixbuf/gdk-pixbuf-loader.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 41b8b79467..16df5ead2c 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,9 @@ +2005-10-12 Matthias Clasen + + * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call + gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589, + Bogdan Nicula) + 2005-10-03 Matthias Clasen * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index 78689e58eb..90281b074b 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -485,7 +485,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, /* we expect it's not to be closed */ g_return_val_if_fail (priv->closed == FALSE, FALSE); - if (priv->image_module == NULL) + if (count > 0 && priv->image_module == NULL) { gint eaten; @@ -727,7 +727,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader, /* we expect it's not closed */ g_return_val_if_fail (priv->closed == FALSE, TRUE); - /* We have less the 128 bytes in the image. Flush it, and keep going. */ + /* We have less the LOADER_HEADER_SIZE bytes in the image. + * Flush it, and keep going. + */ if (priv->image_module == NULL) { GError *tmp = NULL;