summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
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
commit5fcc15abbeea4b9351a99d0171a8042c0fe8ff7b (patch)
tree9ba4a7c05b6038cfe36c7406a17ef4f94155f48d /gdk-pixbuf
parent11ea4f5123a036780974adec33f53bb6c0f45f94 (diff)
downloadgtk+-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/ChangeLog5
-rw-r--r--gdk-pixbuf/io-pnm.c2
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;
}