summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:30:03 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:30:03 -0400
commitc12008b4d0118232aca3f45e3e77137acef75078 (patch)
treed9fd1e50435e25f7acb37638f8358efa4cbedf86 /src
parentccf0106448f566568c8ccd4f0ff1674433a26ad0 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore/efl_appthread.c3
-rw-r--r--src/lib/ecore/efl_exe.c3
-rw-r--r--src/lib/ecore/efl_thread.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/ecore/efl_appthread.c b/src/lib/ecore/efl_appthread.c
index 90a900e..4655d1f 100644
--- a/src/lib/ecore/efl_appthread.c
+++ b/src/lib/ecore/efl_appthread.c
@@ -174,6 +174,7 @@ _efl_appthread_efl_io_writer_write(Eo *obj, Efl_Appthread_Data *pd, Eina_Slice *
174 174
175 errno = 0; 175 errno = 0;
176 if (pd->fd.in == -1) goto err; 176 if (pd->fd.in == -1) goto err;
177 if (!slice) return EINVAL;
177 178
178 do 179 do
179 { 180 {
@@ -194,7 +195,7 @@ _efl_appthread_efl_io_writer_write(Eo *obj, Efl_Appthread_Data *pd, Eina_Slice *
194 } 195 }
195 slice->len = r; 196 slice->len = r;
196 197
197 if ((slice) && (slice->len > 0)) 198 if (slice->len > 0)
198 efl_io_writer_can_write_set(obj, EINA_FALSE); 199 efl_io_writer_can_write_set(obj, EINA_FALSE);
199 if (r == 0) 200 if (r == 0)
200 { 201 {
diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c
index 6dcac4f..f6ae3bf 100644
--- a/src/lib/ecore/efl_exe.c
+++ b/src/lib/ecore/efl_exe.c
@@ -746,6 +746,7 @@ _efl_exe_efl_io_writer_write(Eo *obj, Efl_Exe_Data *pd, Eina_Slice *slice, Eina_
746 746
747 errno = 0; 747 errno = 0;
748 if (pd->fd.in == -1) goto err; 748 if (pd->fd.in == -1) goto err;
749 if (!slice) return EINVAL;
749 750
750 do 751 do
751 { 752 {
@@ -766,7 +767,7 @@ _efl_exe_efl_io_writer_write(Eo *obj, Efl_Exe_Data *pd, Eina_Slice *slice, Eina_
766 } 767 }
767 slice->len = r; 768 slice->len = r;
768 769
769 if ((slice) && (slice->len > 0)) 770 if (slice->len > 0)
770 efl_io_writer_can_write_set(obj, EINA_FALSE); 771 efl_io_writer_can_write_set(obj, EINA_FALSE);
771 if (r == 0) 772 if (r == 0)
772 { 773 {
diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c
index f137888..ab6fdab 100644
--- a/src/lib/ecore/efl_thread.c
+++ b/src/lib/ecore/efl_thread.c
@@ -992,6 +992,7 @@ _efl_thread_efl_io_writer_write(Eo *obj, Efl_Thread_Data *pd, Eina_Slice *slice,
992 992
993 errno = 0; 993 errno = 0;
994 if (pd->fd.in == -1) goto err; 994 if (pd->fd.in == -1) goto err;
995 if (!slice) return EINVAL;
995 996
996 do 997 do
997 { 998 {
@@ -1012,7 +1013,7 @@ _efl_thread_efl_io_writer_write(Eo *obj, Efl_Thread_Data *pd, Eina_Slice *slice,
1012 } 1013 }
1013 slice->len = r; 1014 slice->len = r;
1014 1015
1015 if ((slice) && (slice->len > 0)) 1016 if (slice->len > 0)
1016 efl_io_writer_can_write_set(obj, EINA_FALSE); 1017 efl_io_writer_can_write_set(obj, EINA_FALSE);
1017 if (r == 0) 1018 if (r == 0)
1018 { 1019 {