From 159e2f59296051b03c83a5780f7798f335ad7ed5 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 3 Apr 2016 21:27:57 +0300 Subject: [PATCH] Fix a posible buffer overflow from the previous commit. --- source/Base/Shared.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Base/Shared.cpp b/source/Base/Shared.cpp index 91524963..b140b0bb 100644 --- a/source/Base/Shared.cpp +++ b/source/Base/Shared.cpp @@ -192,7 +192,7 @@ bool SToB(CSStr str) // The currently processed character unsigned i = 0; // Convert only the necessary characters to lowercase - while (i < 8 && *str != '\0') + while (i < 7 && *str != '\0') { buffer[i++] = static_cast< SQChar >(std::tolower(*(str++))); }