Skip to content

Commit 4d6ba70

Browse files
committed
wut
1 parent b6ec0f7 commit 4d6ba70

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dlopen-notes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ def read_dlopen_notes(filename):
3838
note_desc = note['n_desc']
3939

4040
try:
41-
text = note_desc.decode('utf-8').rstrip('\0')
41+
if not isinstance(note_desc, str):
42+
text = note_desc.decode('utf-8').rstrip('\0')
43+
else:
44+
text = note_desc
4245
except UnicodeDecodeError as e:
4346
raise ValueError(f'{filename}: Invalid UTF-8 in .note.dlopen n_desc') from e
4447

0 commit comments

Comments
 (0)