seoz pushed a commit to branch master.

commit 4b5d618e7156975b1886c5eb90750f7e378f0c89
Author: Daniel Juyung Seo <[email protected]>
Date:   Sat Jul 6 12:33:52 2013 +0900

    elm_prefs.c: used strncpy for the fixed size array copy.
    
    This fixes 'copy into fixed size buffer' issue which was spotted by 
coverity. CID 1039998.
---
 src/lib/elm_prefs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c
index 990d398..e3a2d20 100644
--- a/src/lib/elm_prefs.c
+++ b/src/lib/elm_prefs.c
@@ -333,7 +333,7 @@ _elm_prefs_item_node_by_name(Elm_Prefs_Smart_Data *sd,
    char *token;
    char *aux = buf;
 
-   strcpy(buf, name);
+   strncpy(buf, name, PATH_MAX);
 
    token = strsep(&aux, ":");
 

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to