str_check_pathname: Also fail if the forbidden sequence is at the end

This commit is contained in:
heinrich5991 2015-02-26 12:26:01 +01:00 committed by oy
parent d335694931
commit 1af9980b03

View file

@ -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;
}