Fix undefined behaviour in Session::session_name_is_legal
The for loop was checking out of bound indicies causing some perfectly legal session names to be identified as illegal
This commit is contained in:
@@ -6765,7 +6765,7 @@ Session::session_name_is_legal (const string& path)
|
||||
{
|
||||
char illegal_chars[] = { '/', '\\', ':', ';' };
|
||||
|
||||
for (int i = 0; illegal_chars[i]; ++i) {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (path.find (illegal_chars[i]) != string::npos) {
|
||||
return std::string (1, illegal_chars[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user