mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
str_check_pathname
: Also fail if the forbidden sequence is at the end
This commit is contained in:
parent
d335694931
commit
1af9980b03
|
@ -1644,6 +1644,9 @@ int str_check_pathname(const char* str)
|
|||
|
||||
++str;
|
||||
}
|
||||
// If there's "." or ".." at the end, fail too.
|
||||
if(parse_counter >= 1 && parse_counter <= 2)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue