diff options
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index f73251a140..d4ea789274 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -460,8 +460,10 @@ void assert_read_safe_path(const std::string &path) throw (std::string) throw make_stringf("\"%s\" is an absolute path.", path.c_str()); if (path.find("..") != std::string::npos) + { throw make_stringf("\"%s\" contains \"..\" sequences.", path.c_str()); + } #endif // Path is okay. |