Summary: this patch replaces a volnerable function with a safer one.
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7920
Change-Id: I7e83ba8c07dd3dfab892e67f00582c1692d802e7
ev->compose = comp_len ? ev->key + key_len + 1 : NULL;
ev->string = ev->compose;
- strcpy((char *)ev->keyname, keyname);
- strcpy((char *)ev->key, key);
- if (comp_len) strcpy((char *)ev->compose, compose);
+ strncpy((char *)ev->keyname, keyname, key_len + 1);
+ strncpy((char *)ev->key, key, name_len + 1);
+ if (comp_len) strncpy((char *)ev->compose, compose, comp_len +1);
// TIZEN_ONLY(20171107): support a tizen_keyrouter interface
if (window)