From d06af482a93b9eab66f6e74c26b26efd97097a9b Mon Sep 17 00:00:00 2001 From: s1341 Date: Mon, 8 Jan 2024 09:02:59 +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 cc2724d..1208baf 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_string_lossy().to_owned().to_string(), + path: CStr::from_ptr((*file).path).to_owned().into_string().unwrap(), size: (*file).size as usize, offset: (*file).offset, phantom: PhantomData,