use sqlite3_mprintf() fuction instead of sprintf 27/22527/1
authorLi Zhang <li2012.zhang@samsung.com>
Wed, 18 Dec 2013 08:49:39 +0000 (16:49 +0800)
committerLi Zhang <li2012.zhang@samsung.com>
Thu, 5 Jun 2014 09:12:40 +0000 (17:12 +0800)
Change-Id: I2447f55f2b58bf9146d979527b261f23c6a87cbb

configure.ac
packaging/sunpinyin.changes
packaging/sunpinyin.spec
src/ime-core/userdict.cpp

index b91f655..3e5b35b 100755 (executable)
@@ -1,6 +1,6 @@
 #-*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-AC_INIT([sunpinyin],[0.0.1423], [mail@yongsun.me])
+AC_INIT([sunpinyin],[0.0.1518], [mail@yongsun.me])
 AC_PREREQ([2.59])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
index 213a143..f073348 100644 (file)
@@ -1,3 +1,12 @@
+* Wed Dec 18 2013 Li Zhang <li2012.zhang@samsung.com> REBASE@5785a74
+- Use sqlite3_mprintf() fuction instead of sprintf
+
+* Tue Dec 17 2013 Li Zhang <li2012.zhang@samsung.com> REBASE@0f2a1fb
+- Set maxlength of preedit string to 62
+- Fix out of bounds error
+- Remove vulnerable codes related to system() function
+- Fill in license field in spec file
+
 * Thu Jan 31 2013 Li Zhang <li2012.zhang@samsung.com> accepted/tizen_2.0/20130123.093018@a110cbf
 - Always show candidate
 - [N_SE-12903][N_SE-12802]flush to commit the first candidate.
index 818c103..bcfb0ff 100644 (file)
@@ -1,7 +1,7 @@
 Name:       ise-engine-sunpinyin
 Summary:    Chinese Pinyin ISE
-Version:    0.0.1423
-Release:    2
+Version:    0.0.1518
+Release:    1
 Group:      TO_BE/FILLED_IN
 License:    LGPL-2.1+ and CDDL-1.0
 Source0:    %{name}-%{version}.tar.gz
index 339846f..693d929 100644 (file)
@@ -120,12 +120,10 @@ CUserDict::removeWord(unsigned wid)
 {
     assert(m_db != NULL);
     char    *zErr = NULL;
-    char sql[256] = "DELETE FROM dict WHERE id=";
-
     if (wid > INI_USRDEF_WID) {
-        sprintf(sql, "%s%d;", sql, (wid - INI_USRDEF_WID));
+        char *sql = sqlite3_mprintf("DELETE FROM dict WHERE id=%d;", (wid - INI_USRDEF_WID));
         sqlite3_exec(m_db, sql, NULL, NULL, &zErr);
-
+        sqlite3_free(sql);
         m_dict.erase(m_dict.find(wid - INI_USRDEF_WID));
     }
 }