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.
release-2.0.0
Alex Crichton 2 years ago
committed by GitHub
parent
commit
087d9d7bec
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

@ -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 {

Loading…
Cancel
Save