From 3da7f71fb63757ec0e33a88acaa3fca3dc482ec9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 4 Jan 2023 20:27:00 +0100 Subject: [PATCH] Windows process: allow for binary data output Do not rely on null termination. --- libs/pbd/system_exec.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/pbd/system_exec.cc b/libs/pbd/system_exec.cc index dfafa1a3ac..ce6f608adb 100644 --- a/libs/pbd/system_exec.cc +++ b/libs/pbd/system_exec.cc @@ -547,7 +547,8 @@ SystemExec::output_interposer() } if (bytesRead < 1) continue; /* actually not needed; but this is safe. */ data[bytesRead] = 0; - ReadStdout(data, bytesRead); /* EMIT SIGNAL */ + std::string rv = std::string (data, bytesRead); + ReadStdout(rv, bytesRead); /* EMIT SIGNAL */ } Terminated(); /* EMIT SIGNAL */ pthread_exit(0);