From 67fc5df751e9fe93d31c238fd37ca1eb2a25f361 Mon Sep 17 00:00:00 2001 From: Lindsay Hwang Date: Thu, 4 Jun 2026 10:19:41 -0700 Subject: [PATCH 1/3] increased buffer size --- src/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.c b/src/protocol.c index 809cac6..cba3aa2 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -166,7 +166,7 @@ static void wsi_output(struct lws *wsi, pty_buf_t *buf) { int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len) { struct pss_tty *pss = (struct pss_tty *)user; - char buf[256]; + char buf[1024]; size_t n = 0; switch (reason) { From 207d2ba59f2588aee1f66dd9b8c89acde3c4b005 Mon Sep 17 00:00:00 2001 From: Lindsay Hwang Date: Mon, 8 Jun 2026 15:29:44 -0700 Subject: [PATCH 2/3] semicolon --- src/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.c b/src/protocol.c index cba3aa2..bb6a3d0 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -124,7 +124,7 @@ static bool spawn_process(struct pss_tty *pss, uint16_t columns, uint16_t rows) if (close(fd) != 0) { lwsl_err("Close temp file failed with error: %d (%s)\n", errno, strerror(errno)); - return false + return false; } argv[n++] = filePath; } From 4dd648f4240a40d8af074f594266a1d139cc3b05 Mon Sep 17 00:00:00 2001 From: Lindsay Hwang Date: Wed, 10 Jun 2026 10:33:45 -0700 Subject: [PATCH 3/3] invalid error check --- src/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.c b/src/protocol.c index bb6a3d0..2985f3c 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -110,7 +110,7 @@ static bool spawn_process(struct pss_tty *pss, uint16_t columns, uint16_t rows) char *filePath = xmalloc(file_path_len); snprintf(filePath, file_path_len, "%sXXXXXX", server->arg_file); - if ((fd = mkstemp(filePath)) != -1) { + if ((fd = mkstemp(filePath)) == -1) { lwsl_err("Creation of temp file failed with error: %d (%s)\n", errno, strerror(errno)); return false; }