diff --git a/client/sandbox.cpp b/client/sandbox.cpp index 86255be6c8..f27f46f464 100644 --- a/client/sandbox.cpp +++ b/client/sandbox.cpp @@ -107,7 +107,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) { // Capture stdout output while (1) { - ssize_t count = read(fds_out[0], buffer, sizeof(buffer)); + ssize_t count = read(fds_out[0], buffer, sizeof(buffer)-1); if (count == -1) { if (errno == EINTR) { continue; @@ -124,7 +124,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) { // Capture stderr output while (1) { - ssize_t count = read(fds_err[0], buffer, sizeof(buffer)); + ssize_t count = read(fds_err[0], buffer, sizeof(buffer)-1); if (count == -1) { if (errno == EINTR) { continue;