mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Remove possible overflow in str_comp_filenames (fixes #6204)
This commit is contained in:
parent
f230ad0bdc
commit
ed58668931
|
@ -2834,7 +2834,6 @@ int str_comp_filenames(const char *a, const char *b)
|
|||
result = 0;
|
||||
do
|
||||
{
|
||||
if(!result)
|
||||
result = *a - *b;
|
||||
++a;
|
||||
++b;
|
||||
|
@ -2844,7 +2843,7 @@ int str_comp_filenames(const char *a, const char *b)
|
|||
return 1;
|
||||
else if(*b >= '0' && *b <= '9')
|
||||
return -1;
|
||||
else if(result)
|
||||
else
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue