Skip to content

Commit

Permalink
fix double decoding of bytestring when logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zupd authored and Arusekk committed Apr 20, 2022
1 parent c93bdfe commit 1c8bfe3
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 1c8bfe3

Please sign in to comment.