diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2013-10-15 18:23:46 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2014-01-24 17:27:51 +0000 |
commit | e114c90bdadda4c2e49246411e4157025e5f0cca (patch) | |
tree | 956b2e18fa8ed714e945ba3ea43112b6914290c6 | |
parent | 05b87e4a2fcaaeb69c25650e58c67b222e944275 (diff) | |
download | clutter-e114c90bdadda4c2e49246411e4157025e5f0cca.tar.gz |
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
(cherry picked from commit 97724939c8de004d7fa230f3ff64862d957f93a9)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
-rw-r--r-- | 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 6a116d0b7..09324f48d 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); |