Skip to content

Commit

Permalink
Backport writing outside extraction directory bugfix from pyinstxtractor
Browse files Browse the repository at this point in the history
  • Loading branch information
extremecoders-re authored Jun 8, 2023
1 parent 04c3d59 commit 480823e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyinstxtractor-ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ def parseTOC(self):
)

name = name.decode("utf-8").rstrip("\0")

# Prevent writing outside the extraction directory
if name.startswith("/"):
name = name.lstrip("/")

if len(name) == 0:
name = str(uniquename())
print(
Expand Down

0 comments on commit 480823e

Please sign in to comment.