Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rmalmain committed Sep 30, 2024
1 parent 18e825f commit 06ada21
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions libafl_bolts/src/os/windows_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,31 +459,28 @@ unsafe fn internal_handle_exception(
.iter()
.position(|x| *x == exception_code)
.unwrap();
match &EXCEPTION_HANDLERS[index] {
Some(handler_holder) => {
log::info!(
"{:?}: Handling exception {}",
std::process::id(),
exception_code
);
let handler = &mut **handler_holder.handler.get();
handler.handle(exception_code, exception_pointers);
EXCEPTION_CONTINUE_EXECUTION
}
None => {
log::info!(
"{:?}: No handler for exception {}",
std::process::id(),
exception_code
);
// Go to Default one
let handler_holder = &EXCEPTION_HANDLERS[EXCEPTION_HANDLERS_SIZE - 1]
.as_ref()
.unwrap();
let handler = &mut **handler_holder.handler.get();
handler.handle(exception_code, exception_pointers);
EXCEPTION_CONTINUE_SEARCH
}
if let Some(handler_holder) = &EXCEPTION_HANDLERS[index] {
log::info!(
"{:?}: Handling exception {}",
std::process::id(),
exception_code
);
let handler = &mut **handler_holder.handler.get();
handler.handle(exception_code, exception_pointers);
EXCEPTION_CONTINUE_EXECUTION
} else {
log::info!(
"{:?}: No handler for exception {}",
std::process::id(),
exception_code
);
// Go to Default one
let handler_holder = &EXCEPTION_HANDLERS[EXCEPTION_HANDLERS_SIZE - 1]
.as_ref()
.unwrap();
let handler = &mut **handler_holder.handler.get();
handler.handle(exception_code, exception_pointers);
EXCEPTION_CONTINUE_SEARCH
}
}

Expand Down

0 comments on commit 06ada21

Please sign in to comment.