diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2018-04-10 16:13:44 +0900 |
---|---|---|
committer | Shinwoo Kim <cinoo.kim@samsung.com> | 2018-04-10 16:25:11 +0900 |
commit | 579eeb4a8c68967432ddbaa23ddc675e9b64c6b1 (patch) | |
tree | fcd42a1d85aa50e7c35d66206c1618a08f67f283 | |
parent | ab7988b532feda013ac6ce9d094e9b749706677a (diff) | |
download | efl-579eeb4a8c68967432ddbaa23ddc675e9b64c6b1.tar.gz |
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.
-rw-r--r-- | src/lib/efl/interfaces/efl_io_queue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_io_queue.c b/src/lib/efl/interfaces/efl_io_queue.c index 80bc0636fe..d073836c93 100644 --- a/src/lib/efl/interfaces/efl_io_queue.c +++ b/src/lib/efl/interfaces/efl_io_queue.c @@ -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; |