Skip to content

Commit a559986

Browse files
committed
review: reject module on failed signature verification.
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 11457d5 commit a559986

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/v8/v8.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ bool V8::load(const std::string &code, bool allow_precompiled) {
309309
source_ = wasm::vec<byte_t>::make_uninitialized(code.size());
310310
::memcpy(source_.get(), code.data(), code.size());
311311

312-
verifySignature();
312+
if (!verifySignature()) {
313+
return false;
314+
}
313315

314316
if (allow_precompiled) {
315317
const auto section_name = getPrecompiledSectionName();

0 commit comments

Comments
 (0)