diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-07-05 23:23:23 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-07-12 13:22:10 +0200 |
commit | ac95d0de26ed37d2cb05dfff7455ae84089a3b2d (patch) | |
tree | 030e952c2ebabf98e9557abf4bbcf804c28b60ee | |
parent | ec1b4b2ef99f1bd4c3fe17a522d89d067d4999e2 (diff) | |
download | gdk-pixbuf-ac95d0de26ed37d2cb05dfff7455ae84089a3b2d.tar.gz |
gdk-pixbuf-io: Check length before checking for pixdata magic
https://bugzilla.gnome.org/show_bug.cgi?id=784583
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 61a61a823..166981574 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -1665,6 +1665,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * compressed, and uncompressed on-the-fly. */ if (g_resources_get_info (resource_path, 0, &data_size, NULL, NULL) && + data_size > sizeof(guint32) && (bytes = g_resources_lookup_data (resource_path, 0, NULL)) != NULL) { GdkPixbuf*pixbuf = NULL; const guint8 *stream = g_bytes_get_data (bytes, NULL); |