summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-11-16 12:57:14 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-11-16 13:02:10 +0000
commitf8cf378868cd12f870f2eee2100b96b72c5bb08c (patch)
treecad8f7507a242275cced68dadd5d1931f3b0b5dc
parent2ef20d148905fc1619f7ebd9720b316993dcbb4d (diff)
strings - be cleaere we are initialising buffers not appending
also should silence possible code checkers.
-rw-r--r--src/bin/edje/edje_player.c2
-rw-r--r--src/lib/elementary/elc_naviframe.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/edje/edje_player.c b/src/bin/edje/edje_player.c
index d3ae0c9aeb..cacfdf2974 100644
--- a/src/bin/edje/edje_player.c
+++ b/src/bin/edje/edje_player.c
@@ -842,7 +842,7 @@ _edje_circul(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
842 char *group = data; 842 char *group = data;
843 843
844 part_name = eina_list_data_get(eina_list_last(parts)); 844 part_name = eina_list_data_get(eina_list_last(parts));
845 strncat(buf, part_name, sizeof(buf) - 1); 845 strncpy(buf, part_name, sizeof(buf) - 1);
846 part_name[sizeof(buf) - 1] = 0; 846 part_name[sizeof(buf) - 1] = 0;
847 EINA_LIST_FOREACH(parts, l, part_name) 847 EINA_LIST_FOREACH(parts, l, part_name)
848 { 848 {
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index 58a7bfce3b..10368cb014 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -512,9 +512,9 @@ _elm_naviframe_item_elm_widget_item_part_text_set(Eo *eo_it,
512 if (_elm_config->access_mode) 512 if (_elm_config->access_mode)
513 _access_obj_process(nit, EINA_TRUE); 513 _access_obj_process(nit, EINA_TRUE);
514 514
515 memset(buf, 0x0, sizeof(buf)); 515 buf[0] = 0;
516 if (nit->title_label) 516 if (nit->title_label)
517 strncat(buf, nit->title_label, sizeof(buf) - 1); 517 strncpy(buf, nit->title_label, sizeof(buf) - 1);
518 if (nit->subtitle_label) 518 if (nit->subtitle_label)
519 { 519 {
520 if ((nit->title_label) && (strlen(buf) < (sizeof(buf) - 2))) 520 if ((nit->title_label) && (strlen(buf) < (sizeof(buf) - 2)))