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)
downloadefl-d8da207f5f4937a6a99576b04bffa8ff9bfa9cbe.tar.gz
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 )
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);