Skip to content

Commit

Permalink
fix double decoding of bytestring when logging (Gallopsled#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
zupd authored and vboxuser committed Sep 10, 2023
1 parent 2237abb commit ec18bc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/util/packing.py
Expand Up @@ -1040,7 +1040,7 @@ def _need_text(s, level=1):
if encoding == 'auto':
for encoding in 'ASCII', 'UTF-8', 'ISO-8859-1':
try:
s = s.decode(encoding)
s.decode(encoding)
except UnicodeDecodeError:
pass
else:
Expand Down

0 comments on commit ec18bc0

Please sign in to comment.