diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 2840113cc..556f2dc5c 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -109,7 +109,7 @@ jobs: repo: 'com_github_bytecodealliance_wasmtime' os: ubuntu-20.04 arch: s390x - action: build + action: test run_under: docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/s390x piotrsikora/build-tools:bazel-5.0.0-clang-13-gcc-11 - name: 'Wasmtime on macOS/x86_64' runtime: 'wasmtime' diff --git a/src/signature_util.cc b/src/signature_util.cc index 7e3e1d976..9163c4661 100644 --- a/src/signature_util.cc +++ b/src/signature_util.cc @@ -85,6 +85,7 @@ bool SignatureUtil::verifySignature(std::string_view bytecode, std::string &mess uint32_t alg_id; std::memcpy(&alg_id, payload.data(), sizeof(uint32_t)); + alg_id = le32toh(alg_id); if (alg_id != 2) { message = "Signature has a wrong alg_id (want: 2, is: " + std::to_string(alg_id) + ")";