From 14586044c1aa9ca1f52c61eb0450f90fa0a9aa67 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 24 Jul 2024 17:08:40 +0530 Subject: [PATCH] pe: fix resource name casing --- cli.rs | 2 +- lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli.rs b/cli.rs index 3d9cf53..ba7789b 100644 --- a/cli.rs +++ b/cli.rs @@ -27,7 +27,7 @@ fn main() -> Result<(), Box> { if utils::is_pe(&exe) { PortableExecutable::from(&exe)? - .write_resource("_SUI", data)? + .write_resource("__SUI", data)? .build(&mut out)?; } else if utils::is_macho(&exe) { Macho::from(exe)? diff --git a/lib.rs b/lib.rs index adac470..165badb 100644 --- a/lib.rs +++ b/lib.rs @@ -165,7 +165,7 @@ mod pe { }; pub fn find_section(section_name: &str) -> Option<&[u8]> { - let Ok(section_name) = CString::new(section_name.to_uppercase()) else { + let Ok(section_name) = CString::new(section_name) else { return None; };