summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2019-02-13 10:43:23 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-02-13 10:43:23 -0500
commit33c40419502265c7a2c357d6a274453818d98729 (patch)
tree897e316ebd4cf2672d9d8acd424d9130ed1d9ce6 /src
parent80b364f3928c8b986403779be665188a6762edf3 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 0d480f50e8..0a7ae211d3 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -635,9 +635,9 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, xkb_
635 ev->compose = comp_len ? ev->key + key_len + 1 : NULL; 635 ev->compose = comp_len ? ev->key + key_len + 1 : NULL;
636 ev->string = ev->compose; 636 ev->string = ev->compose;
637 637
638 strcpy((char *)ev->keyname, keyname); 638 strncpy((char *)ev->keyname, keyname, key_len + 1);
639 strcpy((char *)ev->key, key); 639 strncpy((char *)ev->key, key, name_len + 1);
640 if (comp_len) strcpy((char *)ev->compose, compose); 640 if (comp_len) strncpy((char *)ev->compose, compose, comp_len +1);
641 641
642 ev->window = (Ecore_Window)window; 642 ev->window = (Ecore_Window)window;
643 ev->event_window = (Ecore_Window)window; 643 ev->event_window = (Ecore_Window)window;