aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/IO/IO.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 07dede0d..3836ba32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,7 @@ dillo-fltk2
- Switched UI shortcuts from a global event handler to UI::handle.
- Bound Ctrl+Space to toggle fullscreen mode.
- Switched dillo to push a URL with fragment (anchor) into the stack.
+ - Added a workaround for a CCC reentrancy segfault.
Patches: Jorge Arellano Cid
+- Connected signals to <li> elements (fixes links within lists).
- Enabled text, background-color and geometry in preferences.
diff --git a/src/IO/IO.c b/src/IO/IO.c
index 5e984ed8..335b4378 100644
--- a/src/IO/IO.c
+++ b/src/IO/IO.c
@@ -158,6 +158,7 @@ static bool_t IO_read(IOData_t *io)
char Buf[IOBufLen];
ssize_t St;
bool_t ret = FALSE;
+ int io_key = io->Key;
DEBUG_MSG(3, " IO_read\n");
@@ -190,8 +191,14 @@ static bool_t IO_read(IOData_t *io)
a_IO_ccc(OpSend, 2, FWD, io->Info, io, NULL);
}
if (St == 0) {
- /* All data read (EOF) */
- a_IO_ccc(OpEnd, 2, FWD, io->Info, io, NULL);
+ /* TODO: design a general way to avoid reentrancy problems with CCC. */
+
+ /* The following check is necessary because the above CCC operation
+ * may abort the whole Chain. */
+ if ((io = IO_get(io_key))) {
+ /* All data read (EOF) */
+ a_IO_ccc(OpEnd, 2, FWD, io->Info, io, NULL);
+ }
}
return ret;
}