Fixed bug sent directly to me. Basically, we weren't checking a failure

Fixed bug sent directly to me.  Basically, we weren't checking a failure case
from load_module, and returning junk to the application.  Bad.

See ChangeLog for more info.
This commit is contained in:
Mark Crichton 2000-01-06 20:19:30 +00:00
parent a0a1584106
commit 519ee0665d
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2000-01-05 Mark Crichton <crichton@gimp.org>
* gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write):
Return 0 if gdk_pixbuf_load_loader_module returns FALSE.
2000-01-05 Elliot Lee <sopwith@redhat.com>
* gdk-pixbuf/pixops/Makefile.am: Link with -lm (to get 'ceil' function)

View File

@ -300,9 +300,10 @@ gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf,
priv->header_buf_offset += nbytes;
if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
gdk_pixbuf_loader_load_module(loader);
if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
if (gdk_pixbuf_loader_load_module(loader) == 0)
return 0;
}
return nbytes;
}

View File

@ -300,9 +300,10 @@ gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf,
priv->header_buf_offset += nbytes;
if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
gdk_pixbuf_loader_load_module(loader);
if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
if (gdk_pixbuf_loader_load_module(loader) == 0)
return 0;
}
return nbytes;
}