diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-02-16 03:38:22 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-02-16 03:38:22 +0000 |
commit | 5fcc15abbeea4b9351a99d0171a8042c0fe8ff7b (patch) | |
tree | 9ba4a7c05b6038cfe36c7406a17ef4f94155f48d /gdk-pixbuf | |
parent | 11ea4f5123a036780974adec33f53bb6c0f45f94 (diff) | |
download | gtk+-5fcc15abbeea4b9351a99d0171a8042c0fe8ff7b.tar.gz |
Don't read over the end of the buffer if '#' appears at the very end.
2005-02-15 Matthias Clasen <mclasen@redhat.com>
* io-pnm.c (pnm_skip_whitespace): Don't read over the end of
the buffer if '#' appears at the very end. (#167141, Doug Morgan)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/ChangeLog | 5 | ||||
-rw-r--r-- | gdk-pixbuf/io-pnm.c | 2 |
2 files changed, 6 insertions, 1 deletions
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 <mclasen@redhat.com> + + * 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 <hans@breuer.org> * 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; } |