From f8ac5285bf694a768956aef7d311e486bd8cd5f9 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 15 Sep 2023 10:37:15 -0700 Subject: [PATCH] Fix Terminal Window Size Update 1. Change sizeof a pointer to a string to WSTRLEN(). It was only copying part of the string "window-change" to the channel status message. --- src/internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 046e9f2f5..1c42618b3 100644 --- a/src/internal.c +++ b/src/internal.c @@ -13025,7 +13025,7 @@ int SendChannelTerminalResize(WOLFSSH* ssh, word32 columns, word32 rows, } if (ret == WS_SUCCESS) { - typeSz = (word32)sizeof(cType) - 1; + typeSz = (word32)WSTRLEN(cType); ret = PreparePacket(ssh, MSG_ID_SZ + UINT32_SZ + LENGTH_SZ + typeSz + BOOLEAN_SZ + (4 * UINT32_SZ)); }