Skip to content

Commit

Permalink
Merge pull request from GHSA-h84q-m8rr-3v9q
Browse files Browse the repository at this point in the history
The Rust definition was previously performing a 4-byte write when the C
API was declared as taking an 1-byte buffer.
  • Loading branch information
alexcrichton committed Nov 10, 2022
1 parent 82db744 commit 75260f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/c-api/src/trap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 75260f5

Please sign in to comment.