stefan pushed a commit to branch master.

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

commit df16616febb21074033ed6e477518b87e100c3e7
Author: Marcel Hollerbach <[email protected]>
Date:   Mon Apr 20 08:46:45 2020 +0200

    exactness-inspect: do not use sprintf
    
    there is not yet a CID for this, but we should probebly not do that.
    
    Reviewed-by: Stefan Schmidt <[email protected]>
    Reviewed-by: Xavi Artigas <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11731
---
 src/bin/exactness/inspect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c
index dcd55b890a..4e2e301536 100644
--- a/src/bin/exactness/inspect.c
+++ b/src/bin/exactness/inspect.c
@@ -318,7 +318,7 @@ _grp_text_get(void *data, Evas_Object *gl, const char *part 
EINA_UNUSED)
               if (!compare)
                 {
                    Exactness_Unit *unit = efl_key_data_get(gl, "unit");
-                   sprintf(buf2, "Fonts directory: %s", unit->fonts_path ? 
unit->fonts_path : "None");
+                   snprintf(buf2, sizeof(buf2), "Fonts directory: %s", 
unit->fonts_path ? unit->fonts_path : "None");
                 }
               else
                 {
@@ -326,7 +326,7 @@ _grp_text_get(void *data, Evas_Object *gl, const char *part 
EINA_UNUSED)
                    Eo *gl2 = eina_list_nth(_gls, 1);
                    Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit");
                    Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit");
-                   sprintf(buf2, "Fonts directory comparison: 
"LDIFF(%s)"/"RDIFF(%s),
+                   snprintf(buf2, sizeof(buf2), "Fonts directory comparison: 
"LDIFF(%s)"/"RDIFF(%s),
                            unit1 ? unit1->fonts_path : "(NULL)", unit2 ? 
unit2->fonts_path : "(NULL)");
                 }
               return strdup(buf2);

-- 


Reply via email to