summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-08 15:05:37 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-09 11:44:00 +0000
commitc7a22fb2c79f638c5b3194c6fcf677a94f65af4d (patch)
treeb5dd59f8607bf92c3e600f77bb56146d2c519003 /src/bin/edje
parent5f24a6496887b3c850b0aac3789d4a1bfd58a3d2 (diff)
edje player - fix ridiculous use of srncat
another case of blind strncat usage rthat seemingly did a: strcat(buf, str); -> strncat(buf, str, strlen(tr)); which is the most pointless thing to do ever. it's no better. it's worse as it makes it harder to identify issues. thanks these days compilers warn about this as a stupid thing to do... so i looked at it and fixed it properly. again - don't do this stuff above - it's pointless. patches that do this should be rejected. fix it properly or leave it as-is.
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_player.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/edje/edje_player.c b/src/bin/edje/edje_player.c
index 079495a174..34c1de1685 100644
--- a/src/bin/edje/edje_player.c
+++ b/src/bin/edje/edje_player.c
@@ -846,11 +846,14 @@ _edje_circul(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
846 char *group = data; 846 char *group = data;
847 847
848 part_name = eina_list_data_get(eina_list_last(parts)); 848 part_name = eina_list_data_get(eina_list_last(parts));
849 strncat(buf, part_name, strlen(part_name)); 849 strncat(buf, part_name, sizeof(buf) - 1);
850 part_name[sizeof(buf) - 1] = 0;
850 EINA_LIST_FOREACH(parts, l, part_name) 851 EINA_LIST_FOREACH(parts, l, part_name)
851 { 852 {
852 strncat(buf, " -> ", strlen(" -> ")); 853 strncat(buf, " -> ", sizeof(buf) - strlen(buf) - 1);
853 strncat(buf, part_name, strlen(part_name)); 854 part_name[sizeof(buf) - 1] = 0;
855 strncat(buf, part_name, sizeof(buf) - strlen(buf) - 1);
856 part_name[sizeof(buf) - 1] = 0;
854 } 857 }
855 858
856 fprintf(stderr, "Group '%s' have a circul dependency between parts: %s\n", 859 fprintf(stderr, "Group '%s' have a circul dependency between parts: %s\n",