From 10bf7a2086a1030999be85c35694ba389e8f494f Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 17 Sep 2020 22:09:51 -0500 Subject: [PATCH] examples/: fix undersized array lengths in client_usage_msg and server_usage_msg. --- examples/client/client.c | 7 ++++--- examples/server/server.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index cfbfc8b4a..cb79a84c8 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -928,10 +928,11 @@ static int ClientRead(WOLFSSL* ssl, char* reply, int replyLen, int mustRead, /* when adding new option, please follow the steps below: */ /* 1. add new option message in English section */ /* 2. increase the number of the second column */ -/* 3. add the same message into Japanese section */ +/* 3. increase the array dimension */ +/* 4. add the same message into Japanese section */ /* (will be translated later) */ -/* 4. add printf() into suitable position of Usage() */ -static const char* client_usage_msg[][59] = { +/* 5. add printf() into suitable position of Usage() */ +static const char* client_usage_msg[][66] = { /* English */ { " NOTE: All files relative to wolfSSL home dir\n", /* 0 */ diff --git a/examples/server/server.c b/examples/server/server.c index 2598dc351..e31b8006d 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -540,10 +540,11 @@ static void ServerWrite(WOLFSSL* ssl, const char* output, int outputLen) /* when adding new option, please follow the steps below: */ /* 1. add new option message in English section */ /* 2. increase the number of the second column */ -/* 3. add the same message into Japanese section */ +/* 3. increase the array dimension */ +/* 4. add the same message into Japanese section */ /* (will be translated later) */ -/* 4. add printf() into suitable position of Usage() */ -static const char* server_usage_msg[][49] = { +/* 5. add printf() into suitable position of Usage() */ +static const char* server_usage_msg[][56] = { /* English */ { " NOTE: All files relative to wolfSSL home dir\n", /* 0 */