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.
This commit is contained in:
Carsten Haitzler 2015-11-12 09:53:32 +09:00
parent e2c244f0c6
commit 5a5b80ebec
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}