Merge pull request #11413 from jdgleaver/menu-explore-fix

Explore Menu: Fix heap buffer overflow on initialisation
This commit is contained in:
Autechre 2020-10-05 14:20:42 +02:00 committed by GitHub
commit 35d7e0ccdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -350,6 +350,8 @@ static int explore_check_company_suffix(const char* p, bool search_reverse)
if (p[-1] != ' ')
return 0;
}
if (p[0] == '\0' || p[1] == '\0' || p[2] == '\0')
return 0;
p0 = p[0];
p1 = p[1];
p2 = p[2];