ximimmodule: fix dereference after null check
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 22 Jan 2014 00:46:24 +0000 (09:46 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 22 Jan 2014 00:46:24 +0000 (09:46 +0900)
CID 1162749:  Dereference after null check  (FORWARD_NULL)
/src/modules/ecore_imf/xim/ecore_imf_xim.c: 1027 in _ecore_imf_xim_preedit_draw_call()

src/modules/ecore_imf/xim/ecore_imf_xim.c

index 5598cacaa044292ea05ff648c89af36ebb588c4f..66a355fa27b085883a41b7358e7c7b1a13b25506 100644 (file)
@@ -1024,7 +1024,10 @@ done:
              imf_context_data->feedbacks = calloc(imf_context_data->preedit_length, sizeof(XIMFeedback));
 
              for (i = 0; i < imf_context_data->preedit_length; i++)
-               imf_context_data->feedbacks[i] = t->feedback[i];
+               {
+                  if (t)
+                    imf_context_data->feedbacks[i] = t->feedback[i];
+               }
           }
 
         ecore_imf_context_preedit_changed_event_add(ctx);