From 36bd7147ccf80e07fd52384ffe8342c7805b6496 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Tue, 18 Oct 2022 13:40:46 +0200 Subject: [PATCH] small change: fix for potential array bounds violation --- usermods/customeffects/arti.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/customeffects/arti.h b/usermods/customeffects/arti.h index 100cc2d3..5345e55b 100644 --- a/usermods/customeffects/arti.h +++ b/usermods/customeffects/arti.h @@ -681,7 +681,7 @@ class Lexer { for (JsonPair tokenPair: definitionJson["TOKENS"].as()) { const char * value = tokenPair.value(); - char currentValue[charLength]; + char currentValue[charLength+1]; strncpy(currentValue, this->text + this->pos, charLength); currentValue[strlen(value)] = '\0'; if (strcmp(value, currentValue) == 0 && strlen(value) > longestTokenLength) {