[at-spi2-atk/gnome-3-20] emit_event: fix out-of-bounds memory access if class is NULL



commit c2eb33645466164b0d74372283eac7603e71122e
Author: Mike Gorse <mgorse suse com>
Date:   Thu Mar 31 12:18:25 2016 -0500

    emit_event: fix out-of-bounds memory access if class is NULL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758935

 atk-adaptor/event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index 6e8c07a..517d653 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]