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 e60c374 commit 087d9d7
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 @@ -92,7 +92,7 @@ pub extern "C" fn wasm_trap_trace(raw: &wasm_trap_t, out: &mut wasm_frame_vec_t)
}

#[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 {
match raw.trap.trap_code() {
Some(c) => {
*code = match c {
Expand Down

0 comments on commit 087d9d7

Please sign in to comment.