cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=38e6780262906ffd8f6ad8de7c8a42868a13a914

commit 38e6780262906ffd8f6ad8de7c8a42868a13a914
Author: Minkyoung Kim <sleepi...@gmail.com>
Date:   Tue Mar 21 11:05:43 2017 -0700

    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 <ced...@osg.samsung.com>
---
 src/modules/ecore_evas/engines/extn/ecore_evas_extn.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 24b230b..af5f3de 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)
            {
               Ipc_Data_Update *ipc;
               int n = e->response;
+              /* b->lockfd is not enough to ensure the size is same 
+               * between what server knows, and client knows.
+               * So should check file lock also. */
+              if (extn->b[n].buf && (!_extnbuf_lock_file_get(extn->b[n].buf)))
+                {  
+                   EINA_LIST_FREE(extn->file.updates, ipc)
+                     {
+                        free(ipc);
+                     }
+                   break;
+                }
 
               EINA_LIST_FREE(extn->file.updates, ipc)
                 {

-- 


Reply via email to