From bb6eeefe269ff8fe12113ff525e0893724bfc13c Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Tue, 15 Oct 2019 09:56:26 -0700 Subject: [PATCH] fix for build with --enable-all and gcc-9 on Linux --- examples/client/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index 223bfce28..0127aa61b 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -2966,12 +2966,12 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) if (sendGET) { printf("SSL connect ok, sending GET...\n"); - msgSz = 28; - strncpy(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); + msgSz = sizeof("GET /index.html HTTP/1.0\r\n\r\n"); + XSTRNCPY(msg, "GET /index.html HTTP/1.0\r\n\r\n", msgSz); msg[msgSz] = '\0'; resumeSz = msgSz; - strncpy(resumeMsg, "GET /index.html HTTP/1.0\r\n\r\n", resumeSz); + XSTRNCPY(resumeMsg, "GET /index.html HTTP/1.0\r\n\r\n", resumeSz); resumeMsg[resumeSz] = '\0'; }