Fix a stack overflow issue (#686)

The length check now include the null-terminated character
This commit is contained in:
smallmodel 2025-03-02 13:40:36 +01:00 committed by GitHub
parent 515a531abf
commit 9963a99868
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -549,7 +549,7 @@ void Alias_ListFindRandomRange(
length = strlen(alias);
if (length > MAX_ALIASLIST_NAME_LENGTH) {
if (length + 1 > MAX_ALIASLIST_NAME_LENGTH) {
return;
}