Add proper input validation for readdir policy

This commit is contained in:
Antonio SJ Musumeci 2023-09-02 15:47:49 -05:00
parent 69de4de53f
commit 335ca55a6e
3 changed files with 33 additions and 6 deletions

View file

@ -81,6 +81,9 @@ FUSE::ReadDir::from_string(std::string const &str_)
{
std::lock_guard<std::mutex> lg(_mutex);
if(!FUSE::ReadDirFactory::valid(str_))
return -EINVAL;
_type = str_;
}