From 83dd1640fced3f2e5144b34f30382f53757852c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 13 Sep 2012 16:28:04 +0200 Subject: [PATCH] Noux: fix SYSCALL_READ return value There is an error if reading from a Io_channel returns -1. In this case the syscall should fail. Fixes #356. --- ports/src/noux/main.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/src/noux/main.cc b/ports/src/noux/main.cc index 3d62fe5fc..d82465b1c 100644 --- a/ports/src/noux/main.cc +++ b/ports/src/noux/main.cc @@ -163,6 +163,9 @@ bool Noux::Child::syscall(Noux::Session::Syscall sc) _block_for_io_channel(io); io->read(_sysio); + if (_sysio->read_out.count == -1) + return false; + return true; }