Skip to content

Commit

Permalink
PE: Decode section names as utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jan 14, 2025
1 parent 371d1e0 commit dabdd9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cle/backends/pe/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PESection(Section):

def __init__(self, pe_section, remap_offset=0, name: str | None = None):
super().__init__(
name or pe_section.Name.decode("latin-1"), # ensure all bytes can be decoded
name or pe_section.Name.decode("utf-8"), # ensure all bytes can be decoded
pe_section.PointerToRawData,
pe_section.VirtualAddress + remap_offset,
pe_section.Misc_VirtualSize,
Expand Down

0 comments on commit dabdd9a

Please sign in to comment.