summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2020-02-25 12:23:30 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-02-25 12:26:37 +0100
commitd8da207f5f4937a6a99576b04bffa8ff9bfa9cbe (patch)
tree5c7a2f3af563156afdde5e8b11fa345ff8132d3b
parentb6bd20a84443cb0ffc0d9f4c6f800cf7182d89cc (diff)
test_efl_gfx_vg_value_provider: expand buffer to avoid truncation by snprintf
Test Plan: compile with `-Wformat-truncation` Reviewers: raster, Hermet, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11405
-rw-r--r--src/bin/elementary/test_efl_gfx_vg_value_provider.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/elementary/test_efl_gfx_vg_value_provider.c b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
index 2b5c9ee864..991c5c4e9d 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -148,7 +148,7 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
148 char new_path[255], new_type[255], new_values[255]; 148 char new_path[255], new_type[255], new_values[255];
149 if (add_value_provider(new_path, new_type, new_values)) 149 if (add_value_provider(new_path, new_type, new_values))
150 { 150 {
151 char buf[255]; 151 char buf[765];
152 //TODO: Even if there is the same path as the existing item, it is added without updating. 152 //TODO: Even if there is the same path as the existing item, it is added without updating.
153 // In efl_ui_vg_animation, duplicate paths are managed. 153 // In efl_ui_vg_animation, duplicate paths are managed.
154 // However, animator (lottie) does not have an implementation that manages overridden values. 154 // However, animator (lottie) does not have an implementation that manages overridden values.
@@ -169,7 +169,7 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
169 } 169 }
170 } 170 }
171 }*/ 171 }*/
172 sprintf(buf, "%s/%s/%s", new_path, new_type, new_values); 172 snprintf(buf, sizeof(buf), "%s/%s/%s", new_path, new_type, new_values);
173 list_it = elm_list_item_append(list, buf, NULL, NULL, NULL, NULL); 173 list_it = elm_list_item_append(list, buf, NULL, NULL, NULL, NULL);
174 elm_list_item_bring_in(list_it); 174 elm_list_item_bring_in(list_it);
175 elm_list_go(list); 175 elm_list_go(list);