forked from enlightenment/efl
ecore_imf: Avoid potential buffer overrun
We can't just blindly copy the full string into a 128 byte buffer. Adding some check here to actually stay below the buffer limit or return. CID 1193233
This commit is contained in:
parent
ddc09dd04e
commit
6924e3010c
|
@ -372,6 +372,7 @@ feed_key_event(Evas *evas, const char *str, Eina_Bool fake)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (strlen(str) + 1 > 128) return;
|
||||
strncpy(key_string, str, strlen(str));
|
||||
evas_event_feed_key_down(evas, key_string, key_string, NULL, NULL, timestamp, NULL);
|
||||
SCIM_DEBUG_FRONTEND(1) << " evas_event_feed_key_down()...\n";
|
||||
|
|
Loading…
Reference in New Issue