Replace sprintf with snprintf
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 13 Mar 2017 23:48:21 +0000 (08:48 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 14 Mar 2017 02:00:27 +0000 (11:00 +0900)
Change-Id: I0ccef57855deb067c02d075fa966736a54259c7a
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/ise.cpp

index e4eb05f..0bef874 100644 (file)
@@ -700,10 +700,10 @@ void ise_show_help_popup(sclulong keyEvent)
     Evas_Object* text = elm_label_add(ctxpopup);
 
     if (keyEvent == MVK_space) {
-        sprintf(buf, "<font_style=Regular font_size=%d align=left wrap=mixed color=#000000>%s</>", font_size,
+        snprintf(buf, sizeof(buf), "<font_style=Regular font_size=%d align=left wrap=mixed color=#000000>%s</>", font_size,
             dgettext(PACKAGE, "IDS_IME_BODY_SWIPE_THE_SPACE_BAR_LEFT_OR_RIGHT_TO_CHANGE_BETWEEN_LANGUAGES"));
     } else {
-        sprintf(buf, "<font_style=Regular font_size=%d align=left wrap=mixed color=#000000>%s</>", font_size,
+        snprintf(buf, sizeof(buf), "<font_style=Regular font_size=%d align=left wrap=mixed color=#000000>%s</>", font_size,
                dgettext(PACKAGE, "IDS_IME_BODY_TAP_AND_HOLD_THIS_KEY_TO_SEE_THE_SYMBOL_LIST_SELECT_ONE_TO_USE_IT_AS_A_SHORTCUT"));
     }
     elm_object_text_set(text, buf);