mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix zip path traversal
this makes sure that the file is in the given root Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
437242169d
commit
56936cf485
5 changed files with 42 additions and 3 deletions
|
|
@ -233,7 +233,7 @@ std::optional<QStringList> extractSubDir(ArchiveReader* zip, const QString& subd
|
|||
<< target;
|
||||
return false;
|
||||
}
|
||||
if (!f->writeFile(ext, target_file_path)) {
|
||||
if (!f->writeFile(ext, target_file_path, target)) {
|
||||
qWarning() << "Failed to extract file" << original_name << "to" << target_file_path;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue