[clutter/clutter-1.18] gesture-action: fix memory corruption
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.18] gesture-action: fix memory corruption
- Date: Thu, 5 Dec 2013 14:42:32 +0000 (UTC)
commit 97724939c8de004d7fa230f3ff64862d957f93a9
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Tue Oct 15 18:23:46 2013 +0100
gesture-action: fix memory corruption
abcf1d589f29ba7914d5648bb9814ad26c13cd83 introduced a crasher because
the 'point' variable points to a piece of memory that is being
reallocated by the begin_gesture (by a g_array_set_size) call 5 lines
before.
https://bugzilla.gnome.org/show_bug.cgi?id=710227
clutter/clutter-gesture-action.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c
index 6a116d0..09324f4 100644
--- a/clutter/clutter-gesture-action.c
+++ b/clutter/clutter-gesture-action.c
@@ -396,11 +396,15 @@ stage_captured_event_cb (ClutterActor *stage,
return CLUTTER_EVENT_PROPAGATE;
}
- if (!begin_gesture(action, actor))
+ if (!begin_gesture (action, actor))
{
- gesture_update_motion_point (point, event);
+ if ((point = gesture_find_point (action, event, &position)) != NULL)
+ gesture_update_motion_point (point, event);
return CLUTTER_EVENT_PROPAGATE;
}
+
+ if ((point = gesture_find_point (action, event, &position)) == NULL)
+ return CLUTTER_EVENT_PROPAGATE;
}
gesture_update_motion_point (point, event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]