emit_event: fix out-of-bounds memory access if class is NULL
authorMike Gorse <mgorse@suse.com>
Thu, 31 Mar 2016 17:18:25 +0000 (12:18 -0500)
committerMike Gorse <mgorse@suse.com>
Thu, 31 Mar 2016 17:20:42 +0000 (12:20 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=758935

atk-adaptor/event.c

index 6e8c07aeb5684df597f770647d3bd0ed4f7e35a8..517d6537307993a4e02026345214fde560ec0632 100644 (file)
@@ -388,7 +388,7 @@ signal_is_needed (AtkObject *obj, const gchar *klass, const gchar *major,
   if (!spi_global_app_data->events_initialized)
     return TRUE;
 
-  data [0] = ensure_proper_format (klass + 21);
+  data [0] = ensure_proper_format (klass[0] ? klass + 21 : klass);
   data [1] = ensure_proper_format (major);
   data [2] = ensure_proper_format (minor);
   data [3] = NULL;