validate_data_value_utf8

Function validate_data_value_utf8 

Source
pub fn validate_data_value_utf8(
    data_section: &[u8],
    offset: usize,
    base_offset: usize,
) -> Result<u32, String>
Expand description

Validate UTF-8 in a decoded data value at the given offset

This function attempts to decode a value from the data section buffer and recursively validates all strings within it.

§Arguments

  • data_section - Raw data section bytes
  • offset - Offset within data section to decode from
  • base_offset - Base offset for pointer calculations (0 for standalone)

§Returns

  • Ok(count) - Number of strings validated (all valid)
  • Err(msg) - Error message if invalid UTF-8 found or decode failed