jihoon pushed a commit to branch master.

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

commit d56c2654f3909c1e8b9aa62cbd71dff8416fcbdb
Author: Jihoon Kim <jihoon48....@samsung.com>
Date:   Wed Oct 8 14:24:14 2014 +0900

    ecore_imf/wayland: fix infinite loop bug when ibus-hangul is used
    
    When korean language was typed with ibus-hangul,
    wayland immodule falled into the infinite loop.
---
 src/modules/ecore_imf/wayland/wayland_imcontext.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c 
b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index a83b493..70b8cab 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -82,6 +82,14 @@ utf8_offset_to_characters(const char *str, int offset)
 {
    int index = 0;
    unsigned int i = 0;
+   int len = 0;
+
+   if (!str) return 0;
+
+   len = strlen(str);
+
+   if (offset > len)
+     offset = len;
 
    for (; index < offset; i++)
      eina_unicode_utf8_next_get(str, &index);

-- 


Reply via email to