xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d8da207f5f4937a6a99576b04bffa8ff9bfa9cbe
commit d8da207f5f4937a6a99576b04bffa8ff9bfa9cbe Author: Yeongjong Lee <[email protected]> Date: Tue Feb 25 12:23:30 2020 +0100 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 --- src/bin/elementary/test_efl_gfx_vg_value_provider.c | 4 ++-- 1 file 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 ) char new_path[255], new_type[255], new_values[255]; if (add_value_provider(new_path, new_type, new_values)) { - char buf[255]; + char buf[765]; //TODO: Even if there is the same path as the existing item, it is added without updating. // In efl_ui_vg_animation, duplicate paths are managed. // 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 ) } } }*/ - sprintf(buf, "%s/%s/%s", new_path, new_type, new_values); + snprintf(buf, sizeof(buf), "%s/%s/%s", new_path, new_type, new_values); list_it = elm_list_item_append(list, buf, NULL, NULL, NULL, NULL); elm_list_item_bring_in(list_it); elm_list_go(list); --
