raster pushed a commit to branch master.

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

commit 09648f6cf1a8db5640a8e25e1be8c6a6c69c4f7a
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Sep 1 19:03:16 2014 +0900

    embryo_cc - fix possible buffer overrun
    
    fix CID 1039589
---
 src/bin/embryo/embryo_cc_sc1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c
index 6432b55..b97e199 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -3030,7 +3030,8 @@ insert_constval(constvalue * prev, constvalue * next, 
char *name,
    if (!(cur = (constvalue *)malloc(sizeof(constvalue))))
       error(103);              /* insufficient memory (fatal error) */
    memset(cur, 0, sizeof(constvalue));
-   strcpy(cur->name, name);
+   strncpy(cur->name, name, sizeof(cur->name) - 1);
+   cur->name[sizeof(cur->name) - 1] = 0;
    cur->value = val;
    cur->index = idx;
    cur->next = next;

-- 


Reply via email to