raster pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=5a5b80ebecfa77929dca8dc31247364ce94af0ee

commit 5a5b80ebecfa77929dca8dc31247364ce94af0ee
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Thu Nov 12 09:53:32 2015 +0900

    fix fuzzing so terminology works at all again
    
       if (len <= 0)
    
    in _cb_fd_read() is ALWAYS coming up with len < 0 for me and that'd
    be LOGICAL... eg if read() returns an error (something ok to allow us
    to continue) and so my terminal content NEVER appears - because
    terminology is returning false from the fb handler asking it to be
    deleted. this is wrong so put it inside #ifdef of fuzzing so it
    doesn't affect "normal people". i still think it is broken tho... but
    at least i have my terminal back now.
---
 src/bin/termpty.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 6535bcb..9585ef2 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -276,9 +276,9 @@ _cb_fd_read(void *data, Ecore_Fd_Handler *fd_handler)
         termpty_handle_buf(ty, codepoint, j);
      }
    if (ty->cb.change.func) ty->cb.change.func(ty->cb.change.data);
+#ifdef ENABLE_FUZZING
    if (len <= 0)
      {
-#ifdef ENABLE_FUZZING
         ty->exit_code = 0;
         ty->pid = -1;
 
@@ -290,9 +290,9 @@ _cb_fd_read(void *data, Ecore_Fd_Handler *fd_handler)
         ty->slavefd = -1;
         if (ty->cb.exited.func)
           ty->cb.exited.func(ty->cb.exited.data);
-#endif
         return ECORE_CALLBACK_CANCEL;
      }
+#endif
 
    return EINA_TRUE;
 }

-- 


Reply via email to