Skip to content

Commit

Permalink
make sure path lives long enough
Browse files Browse the repository at this point in the history
  • Loading branch information
s1341 committed Jan 8, 2024
1 parent d06af48 commit e3baa8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frida-gum/src/range_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e3baa8c

Please sign in to comment.