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:
parent
9194f5cddf
commit
b3c469f106
1 changed files with 1 additions and 1 deletions
|
@ -2616,7 +2616,7 @@ void COM_DefaultExtension (char *path, const char *extension, int maxlen)
|
||||||
//
|
//
|
||||||
src = path + strlen(path) - 1;
|
src = path + strlen(path) - 1;
|
||||||
|
|
||||||
while (*src != '/' && src != path)
|
while (src > path && *src != '/')
|
||||||
{
|
{
|
||||||
if (*src == '.')
|
if (*src == '.')
|
||||||
return; // it has an extension
|
return; // it has an extension
|
||||||
|
|
Loading…
Reference in a new issue