elf_loader update and fix for remote install (#641)
This commit is contained in:
committed by
GitHub
parent
6e5e35610b
commit
7a81b525ed
@@ -37,9 +37,9 @@ std::string last_path_segment(const std::string& path) {
|
||||
return index == std::string::npos ? path : path.substr(index + 1);
|
||||
}
|
||||
|
||||
// Rejects absolute paths and ".." components, so a crafted tar entry can't extract outside destination_path (CWE-22).
|
||||
// Rejects ".." components, so a crafted tar entry can't extract outside destination_path (CWE-22).
|
||||
bool is_tar_entry_path_safe(const std::string& path) {
|
||||
if (path.empty() || path.front() == '/') {
|
||||
if (path.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user