stefan pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d19669b752dc91f326f6503b4675fedf6b4694a5

commit d19669b752dc91f326f6503b4675fedf6b4694a5
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Mon Jun 8 17:20:45 2015 +0200

    test_win_keygrab: Better use strncpy when copying into fixed size buffer.
    
    We should never copy more than PATH_MAX.
    
    CID: 1298016
---
 src/bin/test_win_keygrab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/test_win_keygrab.c b/src/bin/test_win_keygrab.c
index 0bc476b..f1c7473 100644
--- a/src/bin/test_win_keygrab.c
+++ b/src/bin/test_win_keygrab.c
@@ -58,7 +58,7 @@ _entry_changed_cb(void *data , Evas_Object *obj, void 
*event_info EINA_UNUSED)
    api_data *api = data;
    const char *str = elm_entry_entry_get(obj);
    if (!str) return;
-   strcpy(api->keyname, str);
+   strncpy(api->keyname, str, PATH_MAX);
    printf("entry: %s\n",str);
 }
 

-- 


Reply via email to