efl_io_queue: add null check for slice->mem

A negative test case leads to segmentation fault.
If ecore_evas_msg_parent_send is called with NULL data, then slice->mem would
be NULL, and _efl_io_queue_efl_io_writer_write calls memcpy with NULL src.
This commit is contained in:
Shinwoo Kim 2018-04-10 16:13:44 +09:00
parent ab7988b532
commit 579eeb4a8c
1 changed files with 1 additions and 0 deletions

View File

@ -375,6 +375,7 @@ _efl_io_queue_efl_io_writer_write(Eo *o, Efl_Io_Queue_Data *pd, Eina_Slice *slic
int err = EINVAL;
EINA_SAFETY_ON_NULL_RETURN_VAL(slice, EINVAL);
EINA_SAFETY_ON_NULL_RETURN_VAL(slice->mem, EINVAL);
EINA_SAFETY_ON_TRUE_GOTO(efl_io_closer_closed_get(o), error);
err = EBADF;