MCPcopy Create free account
hub / github.com/Nariod/RustPacker / read_cstring

Function read_cstring

src/pe_parser.rs:28–31  ·  view source on GitHub ↗
(data: &[u8], offset: usize)

Source from the content-addressed store, hash-verified

26}
27
28fn read_cstring(data: &[u8], offset: usize) -> Option<String> {
29 let end = data[offset..].iter().position(|&b| b == 0)?;
30 String::from_utf8(data[offset..offset + end].to_vec()).ok()
31}
32
33fn parse_sections(data: &[u8], pe_offset: usize, num_sections: u16) -> Vec<(u32, u32, u32)> {
34 let opt_header_size = read_u16(data, pe_offset + 20) as usize;

Callers 1

parse_exportsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected