Skip to content

Commit 17fc0ae

Browse files
authored
fix double decoding of bytestring when logging (#2051)
1 parent c93bdfe commit 17fc0ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pwnlib/util/packing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ def _need_text(s, level=1):
10401040
if encoding == 'auto':
10411041
for encoding in 'ASCII', 'UTF-8', 'ISO-8859-1':
10421042
try:
1043-
s = s.decode(encoding)
1043+
s.decode(encoding)
10441044
except UnicodeDecodeError:
10451045
pass
10461046
else:

0 commit comments

Comments
 (0)