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
commit18b0a6e10a1ccaeb2e8cdc10b2fa4acfe974a457 (patch)
tree19e91484d20e719bbd6fd5cb979e89cc3e015148 /gdk-pixbuf
parent13f3d3fa3e662fd3cf0aa93c1feea7b764938670 (diff)
downloadgdk-pixbuf-18b0a6e10a1ccaeb2e8cdc10b2fa4acfe974a457.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/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 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,