From 5a5b80ebecfa77929dca8dc31247364ce94af0ee Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 12 Nov 2015 09:53:32 +0900 Subject: [PATCH] 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 6535bcb9..9585ef26 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; }