Browse Source

Merge pull request from GHSA-h84q-m8rr-3v9q

The Rust definition was previously performing a 4-byte write when the C
API was declared as taking an 1-byte buffer.
pull/5245/head
Alex Crichton 2 years ago
committed by GitHub
parent
commit
5b6d5e78de
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      crates/c-api/src/trap.rs

2
crates/c-api/src/trap.rs

@ -116,7 +116,7 @@ pub(crate) fn error_trace<'a>(error: &'a Error, out: &mut wasm_frame_vec_t<'a>)
}
#[no_mangle]
pub extern "C" fn wasmtime_trap_code(raw: &wasm_trap_t, code: &mut i32) -> bool {
pub extern "C" fn wasmtime_trap_code(raw: &wasm_trap_t, code: &mut u8) -> bool {
let trap = match raw.error.downcast_ref::<Trap>() {
Some(trap) => trap,
None => return false,

Loading…
Cancel
Save