diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index da93aa4ade..1df3d50869 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2005-02-15 Matthias Clasen + + * io-pnm.c (pnm_skip_whitespace): Don't read over the end of + the buffer if '#' appears at the very end. (#167141, Doug Morgan) + 2005-02-05 Hans Breuer * makefile.msc : rule for gdk_pixbuf.def diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c index 2ac6d29723..b568b4bccc 100644 --- a/gdk-pixbuf/io-pnm.c +++ b/gdk-pixbuf/io-pnm.c @@ -192,7 +192,7 @@ pnm_skip_whitespace (PnmIOBuffer *inbuf, GError **error) for ( ; *inptr != '\n' && inptr < inend; inptr++) ; - if ( *inptr != '\n' ) { + if ( inptr == inend || *inptr != '\n' ) { /* couldn't read whole comment */ return PNM_SUSPEND; }