summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-06-08 20:57:16 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-06-08 20:57:16 +0000
commitb839a7b0c628446113d53c19d6bff8140fc59c66 (patch)
treecbfd54d725cd34f1de21334a9cf8718304c78043 /gdk-pixbuf
parent70c0c38ff8987a1cfe2f2d241337fe2e38284f65 (diff)
downloadgdk-pixbuf-b839a7b0c628446113d53c19d6bff8140fc59c66.tar.gz
Check for overflow. (#306394, Morten Welinder)
2005-06-08 Matthias Clasen <mclasen@redhat.com> * io-pnm.c (pnm_read_next_value): Check for overflow. (#306394, Morten Welinder)
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 2a0d75a8f..8972c30d9 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-08 Matthias Clasen <mclasen@redhat.com>
+
+ * io-pnm.c (pnm_read_next_value): Check for overflow.
+ (#306394, Morten Welinder)
+
2005-05-27 Matthias Clasen <mclasen@redhat.com>
* io-bmp.c: Accept the 108 byte header of BMP v4. (#168799)
diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c
index b568b4bcc..81e50a7f7 100644
--- a/gdk-pixbuf/io-pnm.c
+++ b/gdk-pixbuf/io-pnm.c
@@ -245,7 +245,7 @@ pnm_read_next_value (PnmIOBuffer *inbuf, gint max_length, guint *value, GError *
/* get the value */
result = strtol (buf, &endptr, 10);
- if (*endptr != '\0' || result < 0) {
+ if (*endptr != '\0' || result < 0 || result > G_MAXUINT) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,