aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-06-08 15:20:45 (GMT)
committerStefan Schmidt <stefan@osg.samsung.com>2015-06-08 15:21:45 (GMT)
commitd19669b752dc91f326f6503b4675fedf6b4694a5 (patch)
tree91b8504aa4a29180098c9cf9714a2361af1939e9
parentelm theme - toolbar - adjust padding for the toolbar to not look so bad (diff)
downloadelementary-d19669b752dc91f326f6503b4675fedf6b4694a5.tar.gz
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 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);
}