diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-09-20 14:40:22 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-09-20 15:06:35 -0400 |
| commit | 052a8d2adb0c7899ae875c03da4edf80b2fa1a81 (patch) | |
| tree | 51fef92c717c7cc3af22446e97aed1bb1fd0bedb /rust/examples/dwarf/shared/src | |
| parent | af2e0455c082239b21bceffbaa1684f795cb1452 (diff) | |
Rust API : FFI Fix, was leaking some non-null-terminated strings to the core..fix passing a nullptr to `load`
Diffstat (limited to 'rust/examples/dwarf/shared/src')
| -rw-r--r-- | rust/examples/dwarf/shared/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rust/examples/dwarf/shared/src/lib.rs b/rust/examples/dwarf/shared/src/lib.rs index 0bf11771..29ca02a4 100644 --- a/rust/examples/dwarf/shared/src/lib.rs +++ b/rust/examples/dwarf/shared/src/lib.rs @@ -95,7 +95,6 @@ pub fn create_section_reader<'a, Endian: 'a + Endianity>( let data = view.read_vec(data_var.address, data_type.width() as usize); let element_type = data_type.element_type().unwrap().contents; - // TODO : broke af? if let Some(current_section_header) = data .chunks(element_type.width() as usize) .find(|section_header| { @@ -104,11 +103,10 @@ pub fn create_section_reader<'a, Endian: 'a + Endianity>( { if (endian.read_u64(¤t_section_header[8..16]) & 2048) != 0 { // Get section, trim header, decompress, return - let offset = section.start() + 24; // TODO : Super broke AF + let offset = section.start() + 24; let len = section.len() - 24; if let Ok(buffer) = view.read_buffer(offset, len) { - // Incredibly broke as fuck use std::ptr; let transform_name = CString::new("Zlib").unwrap().into_bytes_with_nul(); |
