summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-pnm.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-02-16 03:38:22 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-02-16 03:38:22 +0000
commit1a015b847978724c95b5b9f64e66048fdbebf42c (patch)
tree5c645f61e9405cef40cdca2ea899e714e50e9bdf /gdk-pixbuf/io-pnm.c
parent90b8a97ec89ab2da2934d44fb15e77ff478403de (diff)
downloadgdk-pixbuf-1a015b847978724c95b5b9f64e66048fdbebf42c.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/io-pnm.c')
-rw-r--r--gdk-pixbuf/io-pnm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c
index 2ac6d2972..b568b4bcc 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;
}