Fix out-of-bounds read in COM_DefaultExtension

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5887 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-06-21 13:36:24 +00:00
parent 9194f5cddf
commit b3c469f106

View file

@ -2616,7 +2616,7 @@ void COM_DefaultExtension (char *path, const char *extension, int maxlen)
//
src = path + strlen(path) - 1;
while (*src != '/' && src != path)
while (src > path && *src != '/')
{
if (*src == '.')
return; // it has an extension