--- glib2.0-2.32.0.orig/gio/gresource.c	2012-03-12 01:42:40.000000000 +0100
+++ glib2.0-2.32.0/gio/gresource.c	2012-04-02 19:32:36.000000000 +0200
@@ -308,8 +308,10 @@ static gboolean do_lookup (GResource *re
         *size = _size;
       if (flags)
         *flags = _flags;
-      if (data)
-        *data = g_variant_get_data (array);
+      if (data) {
+        *data = g_malloc(_size);
+        memcpy((void*)*data, g_variant_get_data (array), _size);
+      }
       if (data_size)
         {
           /* Don't report trailing newline that non-compressed files has */
