Skip to content

Commit b516a41

Browse files
committed
Abort on parent-directory PKG entries
1 parent 1c2c62f commit b516a41

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

rpcs3/Crypto/unpkg.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,12 @@ bool package_reader::fill_data(std::map<std::string, install_entry*>& all_instal
943943

944944
for (const auto& component : entry_path)
945945
{
946-
if (component == "." || component == "..")
946+
if (component == "..")
947+
{
948+
fmt::throw_exception("PKG entry path contains a parent directory component: '%s'", name);
949+
}
950+
951+
if (component == ".")
947952
{
948953
num_failures++;
949954
pkg_log.error("PKG entry path contains a special component: '%s'", name);

0 commit comments

Comments
 (0)