MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / debug_gps_tracker

Function debug_gps_tracker

hail-fuzz/src/debugging/check.rs:378–393  ·  view source on GitHub ↗
(vm: &mut Vm, debug: DebugConfig)

Source from the content-addressed store, hash-verified

376}
377
378fn debug_gps_tracker(vm: &mut Vm, debug: DebugConfig) {
379 if debug.output.is_some() {
380 const UART_WRITE: u64 = 0x83cc4;
381 register_char_out_printer(vm, UART_WRITE, "r1");
382 }
383
384 // Stack overflow in `USB_SendStringDescriptor`
385 const USB_SEND_STRING_DESCRIPTOR: u64 = 0x8424c;
386 let reg_r1 = vm.cpu.arch.sleigh.get_varnode("r1").unwrap();
387 vm.hook_address(USB_SEND_STRING_DESCRIPTOR, move |cpu, _addr| {
388 let w_len = cpu.read_reg(reg_r1);
389 if w_len > 0xc000 {
390 debug.error(cpu, &format!("USB_SendStringDescriptor with wLength={w_len:#x}"), 30);
391 }
392 });
393}
394
395fn debug_usb(vm: &mut Vm, debug: DebugConfig) {
396 if debug.output.is_some() {

Callers 1

initFunction · 0.85

Calls 2

errorMethod · 0.45

Tested by

no test coverage detected