From 95a19405d8c58a033372529b3e62207772b8a8d0 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 4 Mar 2023 20:17:06 +0100 Subject: [PATCH] fix CID #405230 - array too small --- client/src/cmdcrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdcrc.c b/client/src/cmdcrc.c index 98befcc00..ae424662c 100644 --- a/client/src/cmdcrc.c +++ b/client/src/cmdcrc.c @@ -424,8 +424,8 @@ static int CmdrevengSearch(const char *Cmd) { uint8_t width[NMODELS] = {0}; int count = 0; - char result[30]; - char revResult[30]; + char result[50 + 1] = {0}; + char revResult[50 + 1] = {0}; int ans = GetModels(Models, &count, width); bool found = false; if (!ans) { @@ -461,7 +461,7 @@ static int CmdrevengSearch(const char *Cmd) { continue; } - memset(result, 0, 30); + memset(result, 0, sizeof(result)); char *inCRC = calloc(crcChars + 1, sizeof(char)); if (inCRC == NULL) { return 0;