summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xbm.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-05-31 23:42:33 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-05-31 23:42:33 +0000
commit61857770ce695f7316b0b3ab338478570b93f221 (patch)
treed3c2aed836058bdfecc46a23312c8448af176c16 /gdk-pixbuf/io-xbm.c
parentdc1a2846cf84a3e81d327a9be60878bac8e8d49e (diff)
downloadgdk-pixbuf-61857770ce695f7316b0b3ab338478570b93f221.tar.gz
Accept xbms starting with a C comment - those seem to be not uncommon,
* gdk-pixbuf-io.c (pixbuf_check_xbm): Accept xbms starting with a C comment - those seem to be not uncommon, e.g. the Gimp produces them. (#82706) * io-xbm.c (read_bitmap_file_data): Don't leak memory on certain invalid inputs. (gdk_pixbuf__xbm_image_load_real): Don't leak memory on valid inputs.
Diffstat (limited to 'gdk-pixbuf/io-xbm.c')
-rw-r--r--gdk-pixbuf/io-xbm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index d1a087e44..3ef06bb2a 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -244,6 +244,7 @@ read_bitmap_file_data (FILE *fstream,
*ptr=value;
}
}
+ break;
}
if (!bits)
@@ -323,6 +324,7 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
}
pixels += row_stride;
}
+ g_free (data);
if (context) {
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);