From e811a34bdf81f0f5366b07077432f8ab9c776ddd Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Wed, 2 Aug 2023 21:29:15 -0400 Subject: [PATCH] cmdline: do not write NUL byte to GUI bootstrap script Fixes #628 --- lib/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdline.c b/lib/cmdline.c index d5b1338c..07ba104a 100644 --- a/lib/cmdline.c +++ b/lib/cmdline.c @@ -176,7 +176,7 @@ static void rm_cmd_start_gui(int argc, const char **argv) { return; } - if(write(bootstrap_fd, RM_PY_BOOTSTRAP, sizeof(RM_PY_BOOTSTRAP)) < 0) { + if(write(bootstrap_fd, RM_PY_BOOTSTRAP, strlen(RM_PY_BOOTSTRAP)) < 0) { rm_log_warning_line("Could not bootstrap gui: Unable to write to tempfile: %s", g_strerror(errno)); return;