forked from enlightenment/efl
ecore_wl2: replace strcpy with strncpy
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
This commit is contained in:
parent
80b364f392
commit
33c4041950
|
@ -635,9 +635,9 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, xkb_
|
||||||
ev->compose = comp_len ? ev->key + key_len + 1 : NULL;
|
ev->compose = comp_len ? ev->key + key_len + 1 : NULL;
|
||||||
ev->string = ev->compose;
|
ev->string = ev->compose;
|
||||||
|
|
||||||
strcpy((char *)ev->keyname, keyname);
|
strncpy((char *)ev->keyname, keyname, key_len + 1);
|
||||||
strcpy((char *)ev->key, key);
|
strncpy((char *)ev->key, key, name_len + 1);
|
||||||
if (comp_len) strcpy((char *)ev->compose, compose);
|
if (comp_len) strncpy((char *)ev->compose, compose, comp_len +1);
|
||||||
|
|
||||||
ev->window = (Ecore_Window)window;
|
ev->window = (Ecore_Window)window;
|
||||||
ev->event_window = (Ecore_Window)window;
|
ev->event_window = (Ecore_Window)window;
|
||||||
|
|
Loading…
Reference in New Issue