discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=77602a58535b7df8c96f38d84437b5b3081f5977

commit 77602a58535b7df8c96f38d84437b5b3081f5977
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Mar 10 11:10:21 2016 -0500

    ensure string termination when using strncpy
    
    CID 1352823
---
 src/bin/e_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index bb70ca2..d5bf1b0 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -1370,7 +1370,7 @@ e_gadget_type_del(const char *type)
    E_Gadget_Config *zgc;
    char buf[1024];
 
-   strncpy(buf, type, sizeof(buf));
+   strncpy(buf, type, sizeof(buf) - 1);
 
    if (!gadget_types) return;
 

-- 


Reply via email to