Edit

IABSD.fr/ports/lang/wabt/patches/patch-src_tools_wasm-validate_cc

Branch :

  • Show log

    Commit

  • Author : fcambus
    Date : 2026-05-07 21:46:01
    Hash : 1aebbe53
    Message : Update wabt to 1.0.41.

  • lang/wabt/patches/patch-src_tools_wasm-validate_cc
  • Index: src/tools/wasm-validate.cc
    --- src/tools/wasm-validate.cc.orig
    +++ src/tools/wasm-validate.cc
    @@ -19,6 +19,9 @@
     #include <cstdio>
     #include <cstdlib>
     
    +#include <err.h>
    +#include <unistd.h>
    +
     #include "wabt/binary-reader-ir.h"
     #include "wabt/binary-reader.h"
     #include "wabt/error-formatter.h"
    @@ -68,6 +71,11 @@ int ProgramMain(int argc, char** argv) {
     
       InitStdio();
       ParseOptions(argc, argv);
    +
    +  if (unveil(s_infile.c_str(), "r") != 0)
    +    err(1, "unveil: %s", s_infile.c_str());
    +  if (pledge("stdio rpath", NULL) != 0)
    +    err(1, "pledge");
     
       std::vector<uint8_t> file_data;
       result = ReadFile(s_infile.c_str(), &file_data);