GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit f5869e6a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Check the number of scanned items. (#168906, Morten Welinder)

2005-03-03  Matthias Clasen  <mclasen@redhat.com>

	* io-xpm.c (pixbuf_create_from_xpm): Check the number
	of scanned items.  (#168906, Morten Welinder)
parent a3cee3d8
2005-03-03 Matthias Clasen <mclasen@redhat.com>
* io-xpm.c (pixbuf_create_from_xpm): Check the number
of scanned items. (#168906, Morten Welinder)
Make the gif loader handle oom when loading
animations. (#168857, Tommi Komulainen)
......
......@@ -1230,6 +1230,15 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
return NULL;
}
items = sscanf (buffer, "%d %d %d %d %d %d", &w, &h, &n_col, &cpp, &x_hot, &y_hot);
if (items != 4 && items != 6) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Invalid XPM header"));
return NULL;
}
if (w <= 0) {
g_set_error (error,
GDK_PIXBUF_ERROR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment