raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=60f549c5fb5cc9a43901d505ddd1bb5ac78f323f

commit 60f549c5fb5cc9a43901d505ddd1bb5ac78f323f
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Aug 10 23:09:06 2019 +0100

    efl thread - fic pipe close to not close invalid pipe fds
    
    if we only have stdout and no stdin we'd accidentally close junk int's
    on the stack. fix this fix CID 1396963
---
 src/lib/ecore/efl_thread.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c
index 9aa61aade2..9ae137ae31 100644
--- a/src/lib/ecore/efl_thread.c
+++ b/src/lib/ecore/efl_thread.c
@@ -660,8 +660,11 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
         if (pipe(pipe_from_thread) != 0)
           {
              ERR("Can't create from_thread pipe");
-             close(pipe_to_thread[0]);
-             close(pipe_to_thread[1]);
+             if (td->flags & EFL_TASK_FLAGS_USE_STDIN)
+               {
+                  close(pipe_to_thread[0]);
+                  close(pipe_to_thread[1]);
+               }
              free(thdat);
              return NULL;
           }

-- 


Reply via email to