summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyoung Kim <sleepigmk@gmail.com>2017-03-21 11:05:43 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-03-21 11:05:58 -0700
commit38e6780262906ffd8f6ad8de7c8a42868a13a914 (patch)
tree250270c511e169ceb1651fffc7601d139a384b0a
parent76b5749ea00b1009a5a9621b76604e4883e0e6e2 (diff)
ecore_evas_extn: do not update plug image when lockfile is invalid.
Summary: This prevent invalid shared memory access. Invalid access occur when server is resized sequentially from now to A-size to B-size, and client receive A resize message after resizing B. Then client try to render plug image with A-size, but shared memory is B-size buffer. Size are mismatch. This makes segmentation fault when uploading texture(gl) or rendering image(sw). Test Plan: Indicator rendering on Tizen3.0 platform. Reviewers: jypark, wonsik, dkdk, scholb.kim, jiin.moon, jpeg, cedric Reviewed By: cedric Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4711 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index 24b230b754..af5f3de88d 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -1021,6 +1021,17 @@ _ipc_server_data(void *data, int type EINA_UNUSED, void *event)
1021 { 1021 {
1022 Ipc_Data_Update *ipc; 1022 Ipc_Data_Update *ipc;
1023 int n = e->response; 1023 int n = e->response;
1024 /* b->lockfd is not enough to ensure the size is same
1025 * between what server knows, and client knows.
1026 * So should check file lock also. */
1027 if (extn->b[n].buf && (!_extnbuf_lock_file_get(extn->b[n].buf)))
1028 {
1029 EINA_LIST_FREE(extn->file.updates, ipc)
1030 {
1031 free(ipc);
1032 }
1033 break;
1034 }
1024 1035
1025 EINA_LIST_FREE(extn->file.updates, ipc) 1036 EINA_LIST_FREE(extn->file.updates, ipc)
1026 { 1037 {