forked from enlightenment/efl
efl/io: return EINVAL if null slice is passed for writing
Summary: CIDs 1396996, 1396983, 1396953 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10451
This commit is contained in:
parent
ccf0106448
commit
c12008b4d0
|
@ -174,6 +174,7 @@ _efl_appthread_efl_io_writer_write(Eo *obj, Efl_Appthread_Data *pd, Eina_Slice *
|
|||
|
||||
errno = 0;
|
||||
if (pd->fd.in == -1) goto err;
|
||||
if (!slice) return EINVAL;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -194,7 +195,7 @@ _efl_appthread_efl_io_writer_write(Eo *obj, Efl_Appthread_Data *pd, Eina_Slice *
|
|||
}
|
||||
slice->len = r;
|
||||
|
||||
if ((slice) && (slice->len > 0))
|
||||
if (slice->len > 0)
|
||||
efl_io_writer_can_write_set(obj, EINA_FALSE);
|
||||
if (r == 0)
|
||||
{
|
||||
|
|
|
@ -746,6 +746,7 @@ _efl_exe_efl_io_writer_write(Eo *obj, Efl_Exe_Data *pd, Eina_Slice *slice, Eina_
|
|||
|
||||
errno = 0;
|
||||
if (pd->fd.in == -1) goto err;
|
||||
if (!slice) return EINVAL;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -766,7 +767,7 @@ _efl_exe_efl_io_writer_write(Eo *obj, Efl_Exe_Data *pd, Eina_Slice *slice, Eina_
|
|||
}
|
||||
slice->len = r;
|
||||
|
||||
if ((slice) && (slice->len > 0))
|
||||
if (slice->len > 0)
|
||||
efl_io_writer_can_write_set(obj, EINA_FALSE);
|
||||
if (r == 0)
|
||||
{
|
||||
|
|
|
@ -992,6 +992,7 @@ _efl_thread_efl_io_writer_write(Eo *obj, Efl_Thread_Data *pd, Eina_Slice *slice,
|
|||
|
||||
errno = 0;
|
||||
if (pd->fd.in == -1) goto err;
|
||||
if (!slice) return EINVAL;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -1012,7 +1013,7 @@ _efl_thread_efl_io_writer_write(Eo *obj, Efl_Thread_Data *pd, Eina_Slice *slice,
|
|||
}
|
||||
slice->len = r;
|
||||
|
||||
if ((slice) && (slice->len > 0))
|
||||
if (slice->len > 0)
|
||||
efl_io_writer_can_write_set(obj, EINA_FALSE);
|
||||
if (r == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue