summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-06-08 17:20:45 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2015-06-08 17:21:45 +0200
commitd19669b752dc91f326f6503b4675fedf6b4694a5 (patch)
tree91b8504aa4a29180098c9cf9714a2361af1939e9
parent441736dcaaf44bf5bc5edecc410528f7e27ee1a0 (diff)
test_win_keygrab: Better use strncpy when copying into fixed size buffer.
We should never copy more than PATH_MAX. CID: 1298016
-rw-r--r--src/bin/test_win_keygrab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/test_win_keygrab.c b/src/bin/test_win_keygrab.c
index 0bc476bbb..f1c747397 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)
58 api_data *api = data; 58 api_data *api = data;
59 const char *str = elm_entry_entry_get(obj); 59 const char *str = elm_entry_entry_get(obj);
60 if (!str) return; 60 if (!str) return;
61 strcpy(api->keyname, str); 61 strncpy(api->keyname, str, PATH_MAX);
62 printf("entry: %s\n",str); 62 printf("entry: %s\n",str);
63} 63}
64 64