summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-ico.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2004-09-15 14:33:00 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-09-15 14:33:00 +0000
commitef1d21c0ca749d96e86ac8da39d9c1a0b3ebc424 (patch)
tree2f69619b9800bae3c64ec31c1d467f4c975ae6db /gdk-pixbuf/io-ico.c
parent04f5b48b7dca4e402d0d9725d8d285565f8b5ad9 (diff)
downloadgdk-pixbuf-ef1d21c0ca749d96e86ac8da39d9c1a0b3ebc424.tar.gz
*** empty log message ***
Diffstat (limited to 'gdk-pixbuf/io-ico.c')
-rw-r--r--gdk-pixbuf/io-ico.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c
index a7bcbb4c7..86612dd71 100644
--- a/gdk-pixbuf/io-ico.c
+++ b/gdk-pixbuf/io-ico.c
@@ -323,6 +323,14 @@ static void DecodeHeader(guchar *Data, gint Bytes,
State->HeaderSize+=I;
+ if (State->HeaderSize < 0) {
+ g_set_error (error,
+ GDK_PIXBUF_ERROR,
+ GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+ _("Invalid header in icon"));
+ return;
+ }
+
if (State->HeaderSize>State->BytesInHeaderBuf) {
guchar *tmp=g_try_realloc(State->HeaderBuf,State->HeaderSize);
if (!tmp) {