jihoon pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8fe2ec9d4b6329f1859a975f9909358a5d2263d4

commit 8fe2ec9d4b6329f1859a975f9909358a5d2263d4
Author: Jihoon Kim <[email protected]>
Date:   Tue Dec 3 13:32:15 2013 +0900

    ximmodule: check whether pointer is NULL before accessing in 
xim_preedit_callback_set
    
    ecore_imf_context_data_get () can return NULL, so it should be checked 
before using the result value.
    
    This fixes CID 1135273
---
 src/modules/ecore_imf/xim/ecore_imf_xim.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/ecore_imf/xim/ecore_imf_xim.c 
b/src/modules/ecore_imf/xim/ecore_imf_xim.c
index 7243b42..da33e3c 100644
--- a/src/modules/ecore_imf/xim/ecore_imf_xim.c
+++ b/src/modules/ecore_imf/xim/ecore_imf_xim.c
@@ -1062,6 +1062,8 @@ _ecore_imf_xim_preedit_callback_set(Ecore_IMF_Context 
*ctx)
 {
    Ecore_IMF_Context_Data *imf_context_data;
    imf_context_data = ecore_imf_context_data_get(ctx);
+   if (!imf_context_data)
+     return XVaCreateNestedList(0, NULL);
 
    imf_context_data->preedit_start_cb.client_data = (XPointer)ctx;
    imf_context_data->preedit_start_cb.callback = 
(XIMProc)_ecore_imf_xim_preedit_start_call;

-- 


Reply via email to