summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2013-10-15 18:23:46 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2014-01-24 17:27:51 +0000
commite114c90bdadda4c2e49246411e4157025e5f0cca (patch)
tree956b2e18fa8ed714e945ba3ea43112b6914290c6
parent05b87e4a2fcaaeb69c25650e58c67b222e944275 (diff)
downloadclutter-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.c8
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);