From 2fd523a761a8146777e3ddba0a562faa48bebf85 Mon Sep 17 00:00:00 2001 From: padraigo Date: Tue, 1 Apr 2003 12:42:01 +0000 Subject: [PATCH] 2003-04-01 Padraig O'Briain * atk-bridge/bridge.c (spi_bridge_signal_listener): Add check for number of signal parameter values before accessing them. This fixes bug #109626. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@414 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 6 ++++++ atk-bridge/bridge.c | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 089aed4..9a24ed5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-04-01 Padraig O'Briain + + * atk-bridge/bridge.c (spi_bridge_signal_listener): Add check for + number of signal parameter values before accessing them. This fixes + bug #109626. + 2003-04-01 Bill Haneman * configure.in: Fixed duplicate inclusion of -lspi. diff --git a/atk-bridge/bridge.c b/atk-bridge/bridge.c index 0d83791..bb37a3a 100644 --- a/atk-bridge/bridge.c +++ b/atk-bridge/bridge.c @@ -769,10 +769,16 @@ spi_atk_bridge_signal_listener (GSignalInvocationHint *signal_hint, } else { - if (G_VALUE_TYPE (param_values + 1) == G_TYPE_INT) - detail1 = g_value_get_int (param_values + 1); - if (G_VALUE_TYPE (param_values + 2) == G_TYPE_INT) - detail2 = g_value_get_int (param_values + 2); + if (n_param_values >= 2) + { + if (G_VALUE_TYPE (param_values + 1) == G_TYPE_INT) + detail1 = g_value_get_int (param_values + 1); + if (n_param_values >= 3) + { + if (G_VALUE_TYPE (param_values + 2) == G_TYPE_INT) + detail2 = g_value_get_int (param_values + 2); + } + } if (signal_query.signal_id == atk_signal_text_changed) { -- 2.7.4