Fix P121127-4709: Add cursor position checking
authorLi Zhang <li2012.zhang@samsung.com>
Tue, 11 Dec 2012 11:58:07 +0000 (19:58 +0800)
committerHaifeng Deng <haifeng.deng@samsung.com>
Thu, 13 Dec 2012 06:17:00 +0000 (14:17 +0800)
Change-Id: Iaaacf0cd3636d621c88b4ae5101a93302e17245e

configure.ac
debian/changelog
ism/extras/efl_immodule/isf_imf_context.cpp
packaging/isf.spec
releasenote.txt

index 251d9d4..c54972c 100755 (executable)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script
 #AC_INIT(scim, 1.4.7, suzhe@tsinghua.org.cn)
-AC_INIT(isf, 2.3.6006, isf@samsung.com)
+AC_INIT(isf, 2.3.6011, isf@samsung.com)
 AC_CONFIG_SRCDIR([ism/src/scim.h])
 m4_pattern_allow([^AS_])
 
@@ -11,7 +11,7 @@ m4_pattern_allow([^AS_])
 # ISF version
 ISF_MAJOR_VERSION=2
 ISF_MINOR_VERSION=3
-ISF_MICRO_VERSION=6006
+ISF_MICRO_VERSION=6011
 
 ISF_VERSION=$ISF_MAJOR_VERSION.$ISF_MINOR_VERSION.$ISF_MICRO_VERSION
 
index 8c0441e..0cf11dd 100755 (executable)
@@ -1,3 +1,11 @@
+isf (2.3.6011-1slp2+1) unstable; urgency=low
+
+  * [immodule] Fix P121127-4709: Add cursor position checking
+  * Git: framework/uifw/isf
+  * Tag: isf_2.3.6011-1slp2+1
+
+ -- Li Zhang <li2012.zhang@samsung.com>  Tue, 11 Dec 2012 19:43:00 +0900
+
 isf (2.3.6006-1slp2+1) unstable; urgency=low
 
   * [immodule] Set correct ic for input_panel_show () and input_panel_hide ()
index 6deac4c..7094d0c 100644 (file)
@@ -3511,8 +3511,10 @@ slot_get_surrounding_text (IMEngineInstanceBase *si,
             SCIM_DEBUG_FRONTEND(2) << "Surrounding text: " << surrounding <<"\n";
             SCIM_DEBUG_FRONTEND(2) << "Cursor Index    : " << cursor_index <<"\n";
             WideString before = utf8_mbstowcs (String (surrounding));
+            if (cursor_index > before.length())
+                return false;
+            WideString after = before;
             before = before.substr (0, cursor_index);
-            WideString after = utf8_mbstowcs (String (surrounding));
             after =  after.substr (cursor_index, after.length () - cursor_index);
             if (maxlen_before > 0 && ((unsigned int)maxlen_before) < before.length ())
                 before = WideString (before.begin () + (before.length () - maxlen_before), before.end ());
index 48ba17d..28a0497 100755 (executable)
@@ -4,7 +4,7 @@
 
 Name:       isf
 Summary:    Input Service Framework
-Version:    2.3.6006
+Version:    2.3.6011
 Release:    1
 Group:      TO_BE/FILLED_IN
 License:    LGPL
index c019e08..1f110e9 100755 (executable)
@@ -1,3 +1,7 @@
+ISF 2.3.6011 :
+  1. [immodule] Fix P121127-4709: Add cursor position checking
+
+
 ISF 2.3.6006 :
   1. [immodule] Set correct ic for input_panel_show () and input_panel_hide ()
   2. [immodule] Fix prevent issue. c_str() returns temporary pointer