From 1ad4ea3232daf8fa2c762b75b08b9e9ae330e156 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 13 Sep 2019 09:52:05 -0700 Subject: [PATCH] Fix off by one error in SCP command processing. --- src/wolfscp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wolfscp.c b/src/wolfscp.c index 3b8ccd0..4ea2d4c 100644 --- a/src/wolfscp.c +++ b/src/wolfscp.c @@ -1259,7 +1259,7 @@ int ReceiveScpMessage(WOLFSSH* ssh) return sz; /* null-terminate request, replace newline */ - buf[sz-1] = '\0'; + buf[sz] = '\0'; switch (buf[0]) { case 'C':