From e3baa8c630ffe8214260f1c08d0d9ed09bd22ba3 Mon Sep 17 00:00:00 2001 From: s1341 Date: Mon, 8 Jan 2024 09:07:21 +0200 Subject: [PATCH] make sure path lives long enough --- frida-gum/src/range_details.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frida-gum/src/range_details.rs b/frida-gum/src/range_details.rs index 1208baf..b982695 100644 --- a/frida-gum/src/range_details.rs +++ b/frida-gum/src/range_details.rs @@ -55,7 +55,7 @@ impl<'a> FileMapping<'a> { } else { Some(unsafe { Self { - path: CStr::from_ptr((*file).path).to_owned().into_string().unwrap(), + path: CStr::from_ptr((*file).path).to_string_lossy().into_owned(), size: (*file).size as usize, offset: (*file).offset, phantom: PhantomData,