Treat paths with embedded NUL bytes as invalid (#1765)

Fixes #1763.
This commit is contained in:
Wander Nauta authored and GitHub committed 2024-01-27 08:22:00 -05:00
1 parent 44b3fe6277
commit 4ef9ed80cd
2 files changed
+16

No files matched your search

+1
View File
@@ -2413,6 +2413,7 @@ inline bool is_valid_path(const std::string &path) {
// Read component
auto beg = i;
while (i < path.size() && path[i] != '/') {
if (path[i] == '\0') { return false; }
i++;
}