From dabdd9a652ff870bbb9e25eb0a689fcc7781cf1e Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Tue, 14 Jan 2025 15:03:54 -0700 Subject: [PATCH] PE: Decode section names as utf-8 --- cle/backends/pe/regions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cle/backends/pe/regions.py b/cle/backends/pe/regions.py index 00cbffda..35a64ee4 100644 --- a/cle/backends/pe/regions.py +++ b/cle/backends/pe/regions.py @@ -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,