From 8161dfe3aa6ce43ced80a97df34194f779eedc42 Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 4 May 2020 15:07:28 -0700 Subject: [PATCH] Fix for GCC9 warning. ``` src/tls.c:201:13: note: in expansion of macro 'XSTRNCMP' 201 | if (XSTRNCMP((const char*)sender, (const char*)client, SIZEOF_SENDER) == 0) | ^~~~~~~~ In file included from src/tls.c:33: ./wolfssl/internal.h:4312:19: note: referenced argument declared here 4312 | static const byte client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 }; | ^~~~~~ ``` --- wolfssl/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfssl/internal.h b/wolfssl/internal.h index a60ad2cda..e43949619 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -4309,8 +4309,8 @@ enum ProvisionSide { }; -static const byte client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 }; -static const byte server[SIZEOF_SENDER] = { 0x53, 0x52, 0x56, 0x52 }; +static const byte client[SIZEOF_SENDER+1] = { 0x43, 0x4C, 0x4E, 0x54, 0x00 }; /* CLNT */ +static const byte server[SIZEOF_SENDER+1] = { 0x53, 0x52, 0x56, 0x52, 0x00 }; /* SRVR */ static const byte tls_client[FINISHED_LABEL_SZ + 1] = "client finished"; static const byte tls_server[FINISHED_LABEL_SZ + 1] = "server finished";