diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2013-11-29 11:23:29 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2013-11-29 11:23:29 +0900 |
commit | bab7612bb5b55043a5d9c1f5ae27769e758c37bd (patch) | |
tree | 8071b3e9e3f1083597985b22f1fa8d7aafa033ba | |
parent | 09e0f78bee1cc920376be55102e6ae024e0f9cf6 (diff) |
ibusimmodule: check whether pointer is NULL or not before accessing.
The pointer variable str can be NULL, therefore we should check whether it is NULL or not
before accessing.
This fixes CID 1132621, 1132622, 1132623
-rw-r--r-- | src/modules/ecore_imf/ibus/ibus_imcontext.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/modules/ecore_imf/ibus/ibus_imcontext.c b/src/modules/ecore_imf/ibus/ibus_imcontext.c index 8499a6b49..0f8dcbb63 100644 --- a/src/modules/ecore_imf/ibus/ibus_imcontext.c +++ b/src/modules/ecore_imf/ibus/ibus_imcontext.c @@ -427,10 +427,11 @@ ecore_imf_context_ibus_preedit_string_get(Ecore_IMF_Context *ctx, *cursor_pos = 0; } - if (cursor_pos) - EINA_LOG_DBG("str : %s, cursor_pos : %d", *str, *cursor_pos); - else + if (str) EINA_LOG_DBG("str : %s", *str); + + if (cursor_pos) + EINA_LOG_DBG("cursor_pos : %d", *cursor_pos); } EAPI void @@ -458,7 +459,12 @@ ecore_imf_context_ibus_preedit_string_with_attributes_get(Ecore_IMF_Context *c if (cursor_pos) *cursor_pos = 0; } - EINA_LOG_DBG("str : %s, cursor_pos : %d", *str, *cursor_pos); + + if (str) + EINA_LOG_DBG("str : %s", *str); + + if (cursor_pos) + EINA_LOG_DBG("cursor_pos : %d", *cursor_pos); } EAPI void |