hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0a26ea3594f216d489cd4f844ac9b84f752953c6

commit 0a26ea3594f216d489cd4f844ac9b84f752953c6
Author: Hermet Park <hermetp...@gmail.com>
Date:   Fri Feb 14 17:22:53 2020 +0900

    elementary value provider: replace sprintf() with snprintf()
    
    Avoid vulerable function usage in the test code
---
 src/bin/elementary/test_efl_gfx_vg_value_provider.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 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 d7c3af8a4a..2b5c9ee864 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -280,17 +280,17 @@ void values_input(Eo* box, const char* type)
         char text[2][2];
         if (!strcmp(type, "TrPosition"))
           {
-             sprintf(text[0], "X");
-             sprintf(text[1], "Y");
+             snprintf(text[0], sizeof(text[0]), "X");
+             snprintf(text[1], sizeof(text[1]), "Y");
           }
         else if (!strcmp(type, "TrScale"))
           {
-             sprintf(text[0], "W");
-             sprintf(text[1], "H");
+             snprintf(text[0], sizeof(text[0]), "W");
+             snprintf(text[1], sizeof(text[1]), "H");
           }
         else if (!strcmp(type, "TrRotation"))
           {
-             sprintf(text[0], "R");
+             snprintf(text[0], sizeof(text[0]), "R");
           }
 
         int value_cnt = strstr(type, "Rotation") ? 1 : 2;

-- 


Reply via email to