Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/binaryen-98/src/abi/abi.h
Examining data/binaryen-98/src/abi/js.h
Examining data/binaryen-98/src/abi/stack.h
Examining data/binaryen-98/src/abi/wasm-object.h
Examining data/binaryen-98/src/asm_v_wasm.h
Examining data/binaryen-98/src/asmjs/asm_v_wasm.cpp
Examining data/binaryen-98/src/asmjs/asmangle.cpp
Examining data/binaryen-98/src/asmjs/asmangle.h
Examining data/binaryen-98/src/asmjs/shared-constants.cpp
Examining data/binaryen-98/src/asmjs/shared-constants.h
Examining data/binaryen-98/src/binaryen-c.cpp
Examining data/binaryen-98/src/binaryen-c.h
Examining data/binaryen-98/src/cfg/Relooper.cpp
Examining data/binaryen-98/src/cfg/Relooper.h
Examining data/binaryen-98/src/cfg/cfg-traversal.h
Examining data/binaryen-98/src/cfg/liveness-traversal.h
Examining data/binaryen-98/src/compiler-support.h
Examining data/binaryen-98/src/dataflow/graph.h
Examining data/binaryen-98/src/dataflow/node.h
Examining data/binaryen-98/src/dataflow/users.h
Examining data/binaryen-98/src/dataflow/utils.h
Examining data/binaryen-98/src/emscripten-optimizer/istring.h
Examining data/binaryen-98/src/emscripten-optimizer/optimizer-shared.cpp
Examining data/binaryen-98/src/emscripten-optimizer/optimizer.h
Examining data/binaryen-98/src/emscripten-optimizer/parser.cpp
Examining data/binaryen-98/src/emscripten-optimizer/parser.h
Examining data/binaryen-98/src/emscripten-optimizer/simple_ast.cpp
Examining data/binaryen-98/src/emscripten-optimizer/simple_ast.h
Examining data/binaryen-98/src/emscripten-optimizer/snprintf.h
Examining data/binaryen-98/src/ir/ExpressionAnalyzer.cpp
Examining data/binaryen-98/src/ir/ExpressionManipulator.cpp
Examining data/binaryen-98/src/ir/LocalGraph.cpp
Examining data/binaryen-98/src/ir/ReFinalize.cpp
Examining data/binaryen-98/src/ir/abstract.h
Examining data/binaryen-98/src/ir/bits.h
Examining data/binaryen-98/src/ir/block-utils.h
Examining data/binaryen-98/src/ir/branch-utils.h
Examining data/binaryen-98/src/ir/cost.h
Examining data/binaryen-98/src/ir/debug.h
Examining data/binaryen-98/src/ir/effects.h
Examining data/binaryen-98/src/ir/equivalent_sets.h
Examining data/binaryen-98/src/ir/features.h
Examining data/binaryen-98/src/ir/find_all.h
Examining data/binaryen-98/src/ir/flat.h
Examining data/binaryen-98/src/ir/function-utils.h
Examining data/binaryen-98/src/ir/global-utils.h
Examining data/binaryen-98/src/ir/hashed.h
Examining data/binaryen-98/src/ir/import-utils.h
Examining data/binaryen-98/src/ir/iteration.h
Examining data/binaryen-98/src/ir/label-utils.h
Examining data/binaryen-98/src/ir/literal-utils.h
Examining data/binaryen-98/src/ir/load-utils.h
Examining data/binaryen-98/src/ir/local-graph.h
Examining data/binaryen-98/src/ir/local-utils.h
Examining data/binaryen-98/src/ir/localize.h
Examining data/binaryen-98/src/ir/manipulation.h
Examining data/binaryen-98/src/ir/match.h
Examining data/binaryen-98/src/ir/memory-utils.h
Examining data/binaryen-98/src/ir/module-utils.h
Examining data/binaryen-98/src/ir/names.h
Examining data/binaryen-98/src/ir/parents.h
Examining data/binaryen-98/src/ir/properties.h
Examining data/binaryen-98/src/ir/stack-utils.cpp
Parsing failed to find end of parameter list; semicolon terminated it in (results.end() - checked,
                    results.end(),
                    next.params.end() - checked,
                    [](const Type& produced, const Type& consumed) {
                     
Parsing failed to find end of parameter list; semicolon terminated it in (params.begin(),
               params.end(),
               sig.params.end() - params.size(),
               [](const Type& consumed, const Type& provided) {
                 return Type::isSubType(p
Parsing failed to find end of parameter list; semicolon terminated it in (results.begin(),
               results.end(),
               sig.results.end() - results.size(),
               [](const Type& produced, const Type& expected) {
                 return Type::isSubTy
Parsing failed to find end of parameter list; semicolon terminated it in (sig.params.begin(),
                    sig.params.end() - params.size(),
                    sig.results.begin(),
                    sig.results.end() - results.size(),
                    [](const
Examining data/binaryen-98/src/ir/stack-utils.h
Examining data/binaryen-98/src/ir/table-utils.h
Examining data/binaryen-98/src/ir/trapping.h
Examining data/binaryen-98/src/ir/type-updating.h
Examining data/binaryen-98/src/ir/utils.h
Examining data/binaryen-98/src/literal.h
Examining data/binaryen-98/src/mixed_arena.h
Examining data/binaryen-98/src/parsing.h
Examining data/binaryen-98/src/pass.h
Examining data/binaryen-98/src/passes/AlignmentLowering.cpp
Examining data/binaryen-98/src/passes/Asyncify.cpp
Examining data/binaryen-98/src/passes/AvoidReinterprets.cpp
Examining data/binaryen-98/src/passes/CoalesceLocals.cpp
Examining data/binaryen-98/src/passes/CodeFolding.cpp
Examining data/binaryen-98/src/passes/CodePushing.cpp
Examining data/binaryen-98/src/passes/ConstHoisting.cpp
Examining data/binaryen-98/src/passes/DWARF.cpp
Examining data/binaryen-98/src/passes/DataFlowOpts.cpp
Examining data/binaryen-98/src/passes/DeAlign.cpp
Examining data/binaryen-98/src/passes/DeNaN.cpp
Examining data/binaryen-98/src/passes/DeadArgumentElimination.cpp
Examining data/binaryen-98/src/passes/DeadCodeElimination.cpp
Examining data/binaryen-98/src/passes/Directize.cpp
Examining data/binaryen-98/src/passes/DuplicateFunctionElimination.cpp
Examining data/binaryen-98/src/passes/DuplicateImportElimination.cpp
Examining data/binaryen-98/src/passes/EmscriptenPIC.cpp
Examining data/binaryen-98/src/passes/ExtractFunction.cpp
Examining data/binaryen-98/src/passes/Flatten.cpp
Examining data/binaryen-98/src/passes/FuncCastEmulation.cpp
Examining data/binaryen-98/src/passes/GenerateDynCalls.cpp
Examining data/binaryen-98/src/passes/I64ToI32Lowering.cpp
Examining data/binaryen-98/src/passes/Inlining.cpp
Examining data/binaryen-98/src/passes/InstrumentLocals.cpp
Examining data/binaryen-98/src/passes/InstrumentMemory.cpp
Examining data/binaryen-98/src/passes/LegalizeJSInterface.cpp
Examining data/binaryen-98/src/passes/LimitSegments.cpp
Examining data/binaryen-98/src/passes/LocalCSE.cpp
Examining data/binaryen-98/src/passes/LogExecution.cpp
Examining data/binaryen-98/src/passes/LoopInvariantCodeMotion.cpp
Examining data/binaryen-98/src/passes/MemoryPacking.cpp
Examining data/binaryen-98/src/passes/MergeBlocks.cpp
Examining data/binaryen-98/src/passes/MergeLocals.cpp
Examining data/binaryen-98/src/passes/Metrics.cpp
Examining data/binaryen-98/src/passes/MinifyImportsAndExports.cpp
Examining data/binaryen-98/src/passes/NameList.cpp
Examining data/binaryen-98/src/passes/NoExitRuntime.cpp
Examining data/binaryen-98/src/passes/OptimizeAddedConstants.cpp
Examining data/binaryen-98/src/passes/OptimizeInstructions.cpp
Examining data/binaryen-98/src/passes/PickLoadSigns.cpp
Examining data/binaryen-98/src/passes/PostAssemblyScript.cpp
Examining data/binaryen-98/src/passes/PostEmscripten.cpp
Examining data/binaryen-98/src/passes/Precompute.cpp
Examining data/binaryen-98/src/passes/Print.cpp
Examining data/binaryen-98/src/passes/PrintCallGraph.cpp
Examining data/binaryen-98/src/passes/PrintFeatures.cpp
Examining data/binaryen-98/src/passes/PrintFunctionMap.cpp
Examining data/binaryen-98/src/passes/ReReloop.cpp
Examining data/binaryen-98/src/passes/RedundantSetElimination.cpp
Examining data/binaryen-98/src/passes/RemoveImports.cpp
Examining data/binaryen-98/src/passes/RemoveMemory.cpp
Examining data/binaryen-98/src/passes/RemoveNonJSOps.cpp
Examining data/binaryen-98/src/passes/RemoveUnusedBrs.cpp
Examining data/binaryen-98/src/passes/RemoveUnusedModuleElements.cpp
Examining data/binaryen-98/src/passes/RemoveUnusedNames.cpp
Examining data/binaryen-98/src/passes/ReorderFunctions.cpp
Examining data/binaryen-98/src/passes/ReorderLocals.cpp
Examining data/binaryen-98/src/passes/ReplaceStackPointer.cpp
Examining data/binaryen-98/src/passes/RoundTrip.cpp
Examining data/binaryen-98/src/passes/SSAify.cpp
Examining data/binaryen-98/src/passes/SafeHeap.cpp
Examining data/binaryen-98/src/passes/SimplifyGlobals.cpp
Examining data/binaryen-98/src/passes/SimplifyLocals.cpp
Examining data/binaryen-98/src/passes/Souperify.cpp
Examining data/binaryen-98/src/passes/SpillPointers.cpp
Examining data/binaryen-98/src/passes/StackCheck.cpp
Examining data/binaryen-98/src/passes/StackIR.cpp
Examining data/binaryen-98/src/passes/Strip.cpp
Examining data/binaryen-98/src/passes/StripTargetFeatures.cpp
Examining data/binaryen-98/src/passes/TrapMode.cpp
Examining data/binaryen-98/src/passes/Untee.cpp
Examining data/binaryen-98/src/passes/Vacuum.cpp
Examining data/binaryen-98/src/passes/intrinsics-module.h
Examining data/binaryen-98/src/passes/opt-utils.h
Examining data/binaryen-98/src/passes/pass.cpp
Examining data/binaryen-98/src/passes/passes.h
Examining data/binaryen-98/src/pretty_printing.h
Examining data/binaryen-98/src/shared-constants.h
Examining data/binaryen-98/src/shell-interface.h
Examining data/binaryen-98/src/support/alloc.h
Examining data/binaryen-98/src/support/archive.cpp
Examining data/binaryen-98/src/support/archive.h
Examining data/binaryen-98/src/support/base64.h
Examining data/binaryen-98/src/support/bits.cpp
Examining data/binaryen-98/src/support/bits.h
Examining data/binaryen-98/src/support/colors.cpp
Examining data/binaryen-98/src/support/colors.h
Examining data/binaryen-98/src/support/command-line.cpp
Examining data/binaryen-98/src/support/command-line.h
Examining data/binaryen-98/src/support/debug.cpp
Examining data/binaryen-98/src/support/debug.h
Examining data/binaryen-98/src/support/file.cpp
Examining data/binaryen-98/src/support/file.h
Examining data/binaryen-98/src/support/hash.h
Examining data/binaryen-98/src/support/json.h
Examining data/binaryen-98/src/support/learning.h
Examining data/binaryen-98/src/support/name.h
Examining data/binaryen-98/src/support/path.cpp
Examining data/binaryen-98/src/support/path.h
Examining data/binaryen-98/src/support/permutations.h
Examining data/binaryen-98/src/support/safe_integer.cpp
Examining data/binaryen-98/src/support/safe_integer.h
Examining data/binaryen-98/src/support/small_vector.h
Examining data/binaryen-98/src/support/sorted_vector.h
Examining data/binaryen-98/src/support/string.h
Examining data/binaryen-98/src/support/threads.cpp
Examining data/binaryen-98/src/support/threads.h
Examining data/binaryen-98/src/support/timing.h
Examining data/binaryen-98/src/support/unique_deferring_queue.h
Examining data/binaryen-98/src/support/utilities.cpp
Examining data/binaryen-98/src/support/utilities.h
Examining data/binaryen-98/src/tools/execution-results.h
Examining data/binaryen-98/src/tools/fuzzing.h
Examining data/binaryen-98/src/tools/js-wrapper.h
Examining data/binaryen-98/src/tools/optimization-options.h
Examining data/binaryen-98/src/tools/spec-wrapper.h
Examining data/binaryen-98/src/tools/tool-options.h
Examining data/binaryen-98/src/tools/tool-utils.h
Examining data/binaryen-98/src/tools/wasm-as.cpp
Examining data/binaryen-98/src/tools/wasm-ctor-eval.cpp
Examining data/binaryen-98/src/tools/wasm-dis.cpp
Examining data/binaryen-98/src/tools/wasm-emscripten-finalize.cpp
Examining data/binaryen-98/src/tools/wasm-metadce.cpp
Examining data/binaryen-98/src/tools/wasm-opt.cpp
Examining data/binaryen-98/src/tools/wasm-reduce.cpp
Examining data/binaryen-98/src/tools/wasm-shell.cpp
Examining data/binaryen-98/src/tools/wasm2c-wrapper.h
Examining data/binaryen-98/src/tools/wasm2js.cpp
Examining data/binaryen-98/src/wasm-binary.h
Examining data/binaryen-98/src/wasm-builder.h
Examining data/binaryen-98/src/wasm-debug.h
Examining data/binaryen-98/src/wasm-emscripten.h
Examining data/binaryen-98/src/wasm-features.h
Examining data/binaryen-98/src/wasm-interpreter.h
Examining data/binaryen-98/src/wasm-io.h
Examining data/binaryen-98/src/wasm-module-building.h
Examining data/binaryen-98/src/wasm-printing.h
Examining data/binaryen-98/src/wasm-s-parser.h
Examining data/binaryen-98/src/wasm-stack.h
Examining data/binaryen-98/src/wasm-traversal.h
Examining data/binaryen-98/src/wasm-type.h
Examining data/binaryen-98/src/wasm-validator.h
Examining data/binaryen-98/src/wasm.h
Examining data/binaryen-98/src/wasm/literal.cpp
Examining data/binaryen-98/src/wasm/wasm-binary.cpp
Parsing failed to find end of parameter list; semicolon terminated it in ([&]() { return getInt8(); });
  BYN_TRACE("getU32LEB: " << ret.value << " ==>\n");
  return ret.value;
}

uint64_t WasmBinaryBuilder::getU64LEB() {
  BYN_TRACE("<==\n");
  U64LEB ret;
  ret.read([&](
Parsing failed to find end of parameter list; semicolon terminated it in ([&]() { return getInt8(); });
  BYN_TRACE("getU64LEB: " << ret.value << " ==>\n");
  return ret.value;
}

int32_t WasmBinaryBuilder::getS32LEB() {
  BYN_TRACE("<==\n");
  S32LEB ret;
  ret.read([&]()
Parsing failed to find end of parameter list; semicolon terminated it in ([&]() { return (int8_t)getInt8(); });
  BYN_TRACE("getS32LEB: " << ret.value << " ==>\n");
  return ret.value;
}

int64_t WasmBinaryBuilder::getS64LEB() {
  BYN_TRACE("<==\n");
  S64LEB ret;
  ret.re
Parsing failed to find end of parameter list; semicolon terminated it in ([&]() { return (int8_t)getInt8(); });
  BYN_TRACE("getS64LEB: " << ret.value << " ==>\n");
  return ret.value;
}

Type WasmBinaryBuilder::getType() {
  int type = getS32LEB();
  // Single value types
Examining data/binaryen-98/src/wasm/wasm-debug.cpp
Examining data/binaryen-98/src/wasm/wasm-emscripten.cpp
Examining data/binaryen-98/src/wasm/wasm-interpreter.cpp
Examining data/binaryen-98/src/wasm/wasm-io.cpp
Examining data/binaryen-98/src/wasm/wasm-s-parser.cpp
Examining data/binaryen-98/src/wasm/wasm-stack.cpp
Examining data/binaryen-98/src/wasm/wasm-type.cpp
Examining data/binaryen-98/src/wasm/wasm-validator.cpp
Examining data/binaryen-98/src/wasm/wasm.cpp
Examining data/binaryen-98/src/wasm2js.h
Examining data/binaryen-98/test/bigswitch.cpp
Examining data/binaryen-98/test/calls.cpp
Examining data/binaryen-98/test/control_flow.cpp
Examining data/binaryen-98/test/example/c-api-hello-world.c
Examining data/binaryen-98/test/example/c-api-kitchen-sink.c
Examining data/binaryen-98/test/example/c-api-relooper-unreachable-if.cpp
Examining data/binaryen-98/test/example/c-api-unused-mem.cpp
Examining data/binaryen-98/test/example/cpp-threads.cpp
Examining data/binaryen-98/test/example/cpp-unit.cpp
Examining data/binaryen-98/test/example/match.cpp
Examining data/binaryen-98/test/example/relooper-fuzz.c
Examining data/binaryen-98/test/example/relooper-fuzz1.c
Examining data/binaryen-98/test/example/relooper-fuzz2.c
Examining data/binaryen-98/test/example/relooper-merge1.c
Examining data/binaryen-98/test/example/relooper-merge2.c
Examining data/binaryen-98/test/example/relooper-merge3.c
Examining data/binaryen-98/test/example/relooper-merge4.c
Examining data/binaryen-98/test/example/relooper-merge5.c
Examining data/binaryen-98/test/example/relooper-merge6.c
Examining data/binaryen-98/test/example/relooper-merge7.c
Examining data/binaryen-98/test/example/small_vector.cpp
Examining data/binaryen-98/test/example/stack-utils.cpp
Examining data/binaryen-98/test/example/typeinfo.cpp
Examining data/binaryen-98/test/fannkuch.cpp
Examining data/binaryen-98/test/fasta.cpp
Examining data/binaryen-98/test/float_ops.cpp
Examining data/binaryen-98/test/grow_memory.cpp
Examining data/binaryen-98/test/hello_libcxx.cpp
Examining data/binaryen-98/test/hello_world.c
Examining data/binaryen-98/test/int_ops.c
Examining data/binaryen-98/test/linker/bar.c
Examining data/binaryen-98/test/linker/baz.c
Examining data/binaryen-98/test/linker/foo.c
Examining data/binaryen-98/test/linker/main.c
Examining data/binaryen-98/test/linker/quux.c
Examining data/binaryen-98/test/lld/em_asm.cpp
Examining data/binaryen-98/test/lld/em_asm_O0.c
Examining data/binaryen-98/test/lld/em_asm_shared.cpp
Examining data/binaryen-98/test/lld/hello_world.c
Examining data/binaryen-98/test/lld/init.c
Examining data/binaryen-98/test/lld/longjmp.c
Examining data/binaryen-98/test/lld/recursive.c
Examining data/binaryen-98/test/lld/reserved_func_ptr.cpp
Examining data/binaryen-98/test/lld/shared.cpp
Examining data/binaryen-98/test/lld/shared_longjmp.c
Examining data/binaryen-98/test/mem.cpp
Examining data/binaryen-98/test/printf.c
Examining data/binaryen-98/third_party/llvm-project/Binary.cpp
Examining data/binaryen-98/third_party/llvm-project/ConvertUTF.cpp
Examining data/binaryen-98/third_party/llvm-project/DJB.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFAbbreviationDeclaration.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFAcceleratorTable.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFAddressRange.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFCompileUnit.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFContext.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDataExtractor.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugAbbrev.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugAddr.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugArangeSet.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugAranges.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugFrame.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugInfoEntry.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugLine.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugLoc.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugMacro.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugPubTable.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugRangeList.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDebugRnglists.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFDie.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFEmitter.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFExpression.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFFormValue.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFGdbIndex.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFListTable.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFTypeUnit.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFUnit.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFUnitIndex.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFVerifier.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFVisitor.cpp
Examining data/binaryen-98/third_party/llvm-project/DWARFVisitor.h
Examining data/binaryen-98/third_party/llvm-project/DWARFYAML.cpp
Examining data/binaryen-98/third_party/llvm-project/DataExtractor.cpp
Examining data/binaryen-98/third_party/llvm-project/Debug.cpp
Examining data/binaryen-98/third_party/llvm-project/Dwarf.cpp
Examining data/binaryen-98/third_party/llvm-project/Error.cpp
Examining data/binaryen-98/third_party/llvm-project/Error.h
Examining data/binaryen-98/third_party/llvm-project/ErrorHandling.cpp
Examining data/binaryen-98/third_party/llvm-project/FormatVariadic.cpp
Examining data/binaryen-98/third_party/llvm-project/Hashing.cpp
Examining data/binaryen-98/third_party/llvm-project/LEB128.cpp
Examining data/binaryen-98/third_party/llvm-project/LineIterator.cpp
Examining data/binaryen-98/third_party/llvm-project/MCRegisterInfo.cpp
Examining data/binaryen-98/third_party/llvm-project/MD5.cpp
Examining data/binaryen-98/third_party/llvm-project/MemoryBuffer.cpp
Examining data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp
Examining data/binaryen-98/third_party/llvm-project/ObjectFile.cpp
Examining data/binaryen-98/third_party/llvm-project/Optional.cpp
Examining data/binaryen-98/third_party/llvm-project/Path.cpp
Examining data/binaryen-98/third_party/llvm-project/ScopedPrinter.cpp
Examining data/binaryen-98/third_party/llvm-project/SmallVector.cpp
Examining data/binaryen-98/third_party/llvm-project/SourceMgr.cpp
Examining data/binaryen-98/third_party/llvm-project/StringMap.cpp
Examining data/binaryen-98/third_party/llvm-project/StringRef.cpp
Examining data/binaryen-98/third_party/llvm-project/SymbolicFile.cpp
Examining data/binaryen-98/third_party/llvm-project/Twine.cpp
Examining data/binaryen-98/third_party/llvm-project/UnicodeCaseFold.cpp
Examining data/binaryen-98/third_party/llvm-project/Unix/Unix.h
Examining data/binaryen-98/third_party/llvm-project/WithColor.cpp
Examining data/binaryen-98/third_party/llvm-project/YAMLParser.cpp
Examining data/binaryen-98/third_party/llvm-project/YAMLTraits.cpp
Examining data/binaryen-98/third_party/llvm-project/dwarf2yaml.cpp
Examining data/binaryen-98/third_party/llvm-project/include/llvm-c/DataTypes.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm-c/DisassemblerTypes.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm-c/Error.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm-c/ErrorHandling.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm-c/Types.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/APFloat.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/APInt.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/APSInt.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/AllocatorList.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ArrayRef.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/BitmaskEnum.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/DenseMap.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/DenseMapInfo.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/DenseSet.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/EpochTracker.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/FoldingSet.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/FunctionExtras.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Hashing.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/MapVector.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/None.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Optional.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/PointerIntPair.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/PointerUnion.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/STLExtras.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallPtrSet.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallSet.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallString.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallVector.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringExtras.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringMap.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringRef.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringSet.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringSwitch.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Triple.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Twine.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/bit.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/edit_distance.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/fallible_iterator.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ilist_base.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ilist_iterator.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ilist_node.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ilist_node_base.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ilist_node_options.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/iterator.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/iterator_range.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ADT/simple_ilist.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/COFF.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Dwarf.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/ELF.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Magic.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Wasm.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Config/abi-breaking.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Config/config.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Config/llvm-config.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DIContext.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFAttribute.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFContext.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFDie.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFExpression.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFGdbIndex.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFListTable.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFObject.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFSection.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFUnit.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/LaneBitmask.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCExpr.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCFixup.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCFragment.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCInst.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCRegister.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCRegisterInfo.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCSymbol.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/MCSymbolWasm.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/MC/SubtargetFeature.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/Binary.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/CVDebugRecord.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/Decompressor.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/ELF.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/ELFObjectFile.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/ELFTypes.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/Error.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/MachO.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/Minidump.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/ObjectFile.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/RelocationResolver.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/SymbolicFile.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Object/Wasm.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ObjectYAML/DWARFYAML.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/ObjectYAML/ObjectYAML.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/AArch64TargetParser.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ARMAttributeParser.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ARMBuildAttributes.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ARMTargetParser.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/AlignOf.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Alignment.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Allocator.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/BinaryByteStream.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/BinaryStream.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/BinaryStreamError.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/CBindingWrapping.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Casting.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Chrono.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/CodeGen.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/CommandLine.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Compiler.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ConvertUTF.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/DJB.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/DataExtractor.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/DataTypes.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Debug.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Errc.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Errno.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Error.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ErrorHandling.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ErrorOr.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FileOutputBuffer.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FileSystem.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Format.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FormatAdapters.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FormatCommon.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FormatProviders.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FormatVariadic.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FormatVariadicDetails.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/FormattedStream.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Host.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/LEB128.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/LineIterator.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Locale.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/MD5.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ManagedStatic.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/MemAlloc.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/MemoryBuffer.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/NativeFormatting.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Path.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/PointerLikeTypeTraits.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Printable.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Process.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Program.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Regex.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ReverseIteration.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/SMLoc.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/ScopedPrinter.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Signals.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/SmallVectorMemoryBuffer.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/SourceMgr.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/SwapByteOrder.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/TargetParser.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/TargetRegistry.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Threading.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/TypeSize.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/Unicode.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/UnicodeCharRanges.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/WindowsError.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/WithColor.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/YAMLParser.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/YAMLTraits.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/circular_raw_ostream.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/raw_ostream.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/Support/type_traits.h
Examining data/binaryen-98/third_party/llvm-project/include/llvm/include/llvm/DebugInfo/DWARFContext.h
Examining data/binaryen-98/third_party/llvm-project/obj2yaml_Error.cpp
Examining data/binaryen-98/third_party/llvm-project/raw_ostream.cpp
Examining data/binaryen-98/third_party/wabt/wasm2c/wasm-rt-impl.c
Examining data/binaryen-98/third_party/wabt/wasm2c/wasm-rt-impl.h
Examining data/binaryen-98/third_party/wabt/wasm2c/wasm-rt.h

FINAL RESULTS:

data/binaryen-98/src/ir/LocalGraph.cpp:167:28:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
          for (auto* get : gets) {
data/binaryen-98/src/ir/LocalGraph.cpp:170:11:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
          gets.clear();
data/binaryen-98/src/ir/LocalGraph.cpp:177:13:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
        if (gets.empty()) {
data/binaryen-98/src/ir/LocalGraph.cpp:191:32:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
              for (auto* get : gets) {
data/binaryen-98/src/ir/LocalGraph.cpp:210:34:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
                for (auto* get : gets) {
data/binaryen-98/src/ir/LocalGraph.cpp:220:9:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
        gets.clear();
data/binaryen-98/src/passes/LoopInvariantCodeMotion.cpp:225:23:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    FindAll<LocalGet> gets(curr);
data/binaryen-98/src/passes/LoopInvariantCodeMotion.cpp:226:22:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    for (auto* get : gets.list) {
data/binaryen-98/src/passes/SSAify.cpp:121:23:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    FindAll<LocalGet> gets(func->body);
data/binaryen-98/src/passes/SSAify.cpp:122:22:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    for (auto* get : gets.list) {
data/binaryen-98/src/passes/Souperify.cpp:96:56:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
      std::cout << "addSetUses for " << set << ", " << gets.size() << " gets\n";
data/binaryen-98/src/passes/Souperify.cpp:98:22:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    for (auto* get : gets) {
data/binaryen-98/src/cfg/Relooper.cpp:1702:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(Format, Args);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:41:18:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define err(str) fprintf(stderr, str "\n");
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:42:24:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define errv(str, ...) fprintf(stderr, str "\n", __VA_ARGS__);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:974:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
          snprintf(buffer, BUFFERSIZE - 1, format, d);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:988:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
          snprintf(buffer, BUFFERSIZE - 1, asHex ? "0x%llx" : "%llu", uu);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:999:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
          snprintf(buffer, BUFFERSIZE - 1, e ? "%e" : "%.0f", d);
data/binaryen-98/src/emscripten-optimizer/snprintf.h:27:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf c99_snprintf
data/binaryen-98/src/tools/wasm-opt.cpp:52:18:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  FILE* stream = popen(command.c_str(), "r");
data/binaryen-98/src/tools/wasm-reduce.cpp:178:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    code = system(("timeout " + std::to_string(timeout) + "s " + command +
data/binaryen-98/src/tools/wasm-reduce.cpp:183:20:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    FILE* stream = popen(
data/binaryen-98/test/lld/recursive.c:4:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
int printf(const char* fmt, ...);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/FileSystem.h:462:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
std::error_code access(const Twine &Path, AccessMode Mode);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/FileSystem.h:469:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  return !access(Path, AccessMode::Exist);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/FileSystem.h:483:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  return !access(Path, AccessMode::Write);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Format.h:97:12:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    return _snprintf(Buffer, BufferSize, Fmt, std::get<Is>(Vals)...);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Format.h:99:12:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    return snprintf(Buffer, BufferSize, Fmt, std::get<Is>(Vals)...);
data/binaryen-98/src/passes/Print.cpp:33:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("BINARYEN_PRINT_FULL")) {
data/binaryen-98/src/passes/Print.cpp:34:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return std::stoi(getenv("BINARYEN_PRINT_FULL")) != 0;
data/binaryen-98/src/passes/Souperify.cpp:51:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  static char* str = getenv("BINARYEN_DEBUG_SOUPERIFY");
data/binaryen-98/src/passes/Souperify.cpp:184:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    auto* depthLimitStr = getenv("BINARYEN_SOUPERIFY_DEPTH_LIMIT");
data/binaryen-98/src/passes/Souperify.cpp:188:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    auto* totalLimitStr = getenv("BINARYEN_SOUPERIFY_TOTAL_LIMIT");
data/binaryen-98/src/passes/pass.cpp:818:5:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    getenv("BINARYEN_PASS_DEBUG") ? atoi(getenv("BINARYEN_PASS_DEBUG")) : 0;
data/binaryen-98/src/passes/pass.cpp:818:42:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    getenv("BINARYEN_PASS_DEBUG") ? atoi(getenv("BINARYEN_PASS_DEBUG")) : 0;
data/binaryen-98/src/support/colors.cpp:34:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return (getenv("COLORS") && getenv("COLORS")[0] == '1') || // forced
data/binaryen-98/src/support/colors.cpp:34:33:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return (getenv("COLORS") && getenv("COLORS")[0] == '1') || // forced
data/binaryen-98/src/support/colors.cpp:36:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            (!getenv("COLORS") || getenv("COLORS")[0] != '0')); // implicit
data/binaryen-98/src/support/colors.cpp:36:35:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            (!getenv("COLORS") || getenv("COLORS")[0] != '0')); // implicit
data/binaryen-98/src/support/colors.cpp:50:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
           (!getenv("COLORS") || getenv("COLORS")[0] != '0'); // implicit
data/binaryen-98/src/support/colors.cpp:50:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
           (!getenv("COLORS") || getenv("COLORS")[0] != '0'); // implicit
data/binaryen-98/src/support/path.cpp:54:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  auto* envVar = getenv("BINARYEN_ROOT");
data/binaryen-98/src/support/threads.cpp:146:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("BINARYEN_CORES")) {
data/binaryen-98/src/support/threads.cpp:147:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    num = std::stoi(getenv("BINARYEN_CORES"));
data/binaryen-98/src/tools/wasm-reduce.cpp:117:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    if (!CreateProcess(NULL, // No module name (use command line)
data/binaryen-98/src/tools/wasm-reduce.cpp:117:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    if (!CreateProcess(NULL, // No module name (use command line)
data/binaryen-98/src/binaryen-c.cpp:69:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&ret.v128, x.getv128Ptr(), 16);
data/binaryen-98/src/binaryen-c.cpp:1222:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(mask.data(), mask_, 16);
data/binaryen-98/src/binaryen-c.cpp:2130:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, static_cast<Const*>(expression)->value.getv128().data(), 16);
data/binaryen-98/src/binaryen-c.cpp:2570:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(mask, static_cast<SIMDShuffle*>(expression)->mask.data(), 16);
data/binaryen-98/src/binaryen-c.cpp:2578:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(mask.data(), mask_, 16);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:950:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char full_storage_f[BUFFERSIZE], full_storage_e[BUFFERSIZE];
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:960:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char format[6];
data/binaryen-98/src/literal.h:685:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&chunks, a.getv128Ptr(), 16);
data/binaryen-98/src/passes/Souperify.cpp:52:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  static int ret = str ? atoi(str) : 0;
data/binaryen-98/src/passes/Souperify.cpp:186:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      depthLimit = atoi(depthLimitStr);
data/binaryen-98/src/passes/Souperify.cpp:190:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      totalLimit = atoi(totalLimitStr);
data/binaryen-98/src/passes/pass.cpp:818:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    getenv("BINARYEN_PASS_DEBUG") ? atoi(getenv("BINARYEN_PASS_DEBUG")) : 0;
data/binaryen-98/src/shell-interface.h:74:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&memory[address], &value, sizeof(T));
data/binaryen-98/src/shell-interface.h:82:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&loaded, &memory[address], sizeof(T));
data/binaryen-98/src/support/file.cpp:45:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  infile.open(filename, flags);
data/binaryen-98/src/support/file.cpp:101:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        outfile.open(filename, flags);
data/binaryen-98/src/tools/optimization-options.h:117:42:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
             passOptions.optimizeLevel = atoi(argument.c_str());
data/binaryen-98/src/tools/optimization-options.h:124:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
             passOptions.shrinkLevel = atoi(argument.c_str());
data/binaryen-98/src/tools/optimization-options.h:142:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
               static_cast<Index>(atoi(argument.c_str()));
data/binaryen-98/src/tools/optimization-options.h:153:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
               static_cast<Index>(atoi(argument.c_str()));
data/binaryen-98/src/tools/optimization-options.h:166:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
               static_cast<Index>(atoi(argument.c_str()));
data/binaryen-98/src/tools/wasm-ctor-eval.cpp:334:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(getMemory<T>(address), &value, sizeof(T));
data/binaryen-98/src/tools/wasm-ctor-eval.cpp:340:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&ret, getMemory<T>(address), sizeof(T));
data/binaryen-98/src/tools/wasm-opt.cpp:51:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[MAX_BUFFER];
data/binaryen-98/src/tools/wasm-opt.cpp:288:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    outfile.open(emitJSWrapper, std::ofstream::out);
data/binaryen-98/src/tools/wasm-opt.cpp:294:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    outfile.open(emitSpecWrapper, std::ofstream::out);
data/binaryen-98/src/tools/wasm-opt.cpp:300:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    outfile.open(emitWasm2CWrapper, std::ofstream::out);
data/binaryen-98/src/tools/wasm-reduce.cpp:182:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[MAX_BUFFER];
data/binaryen-98/src/tools/wasm-reduce.cpp:1138:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
           timeout = atoi(argument.c_str());
data/binaryen-98/src/tools/wasm-shell.cpp:262:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
             skipped.insert(atoi(sub.c_str()));
data/binaryen-98/src/wasm/literal.cpp:47:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&v128, init, 16);
data/binaryen-98/src/wasm/literal.cpp:73:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&v128, other.v128, 16);
data/binaryen-98/src/wasm/literal.cpp:111:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&dest, bytes.data(), sizeof(bytes));
data/binaryen-98/src/wasm/literal.cpp:183:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(ret.data(), v128, sizeof(ret));
data/binaryen-98/src/wasm/literal.cpp:258:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buf, &i32, sizeof(i32));
data/binaryen-98/src/wasm/literal.cpp:262:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buf, &i64, sizeof(i64));
data/binaryen-98/src/wasm/literal.cpp:265:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buf, &v128, sizeof(v128));
data/binaryen-98/src/wasm/wasm-io.cpp:56:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    sourceMapStream->open(sourceMapFilename);
data/binaryen-98/src/wasm/wasm-io.cpp:76:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  infile.open(filename, flags);
data/binaryen-98/src/wasm/wasm-io.cpp:77:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[4] = {1, 2, 3, 4};
data/binaryen-98/src/wasm/wasm-io.cpp:141:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    sourceMapStream->open(sourceMapFilename);
data/binaryen-98/src/wasm/wasm-s-parser.cpp:208:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    IString(name.c_str(), false), atoi(lineStr.c_str()), atoi(colStr.c_str()));
data/binaryen-98/src/wasm/wasm-s-parser.cpp:208:58:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    IString(name.c_str(), false), atoi(lineStr.c_str()), atoi(colStr.c_str()));
data/binaryen-98/src/wasm/wasm-s-parser.cpp:445:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    size_t offset = atoi(s.str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:464:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    size_t offset = atoi(s.str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:478:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    size_t offset = atoi(s.str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:491:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    size_t offset = atoi(s.str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:1062:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  Index ret = atoi(s.c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:1596:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  ret->segment = atoi(s[1]->str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:1606:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  ret->segment = atoi(s[1]->str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:1976:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  ret->index = atoi(s[1]->str().c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:2466:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    event->attribute = atoi(attrElem[1]->c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:2622:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        wasm.table.initial = atoi(s[i++]->c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:2625:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        wasm.table.max = atoi(s[i++]->c_str());
data/binaryen-98/src/wasm/wasm-s-parser.cpp:2765:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  event->attribute = atoi(attrElem[1]->c_str());
data/binaryen-98/test/example/c-api-kitchen-sink.c:1180:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/binaryen-98/test/example/c-api-kitchen-sink.c:1339:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char out[15] = {};
data/binaryen-98/test/example/c-api-unused-mem.cpp:95:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1024];
data/binaryen-98/test/fannkuch.cpp:150:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   int n = argc > 1 ? atoi(argv[1]) : 0;
data/binaryen-98/test/fasta.cpp:91:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buffer[lineLength + 2];
data/binaryen-98/test/fasta.cpp:99:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( buffer, in, size );
data/binaryen-98/test/fasta.cpp:100:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy( buffer + size, in, lineLength );
data/binaryen-98/test/fasta.cpp:105:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(temp, buffer + pos, bytes);
data/binaryen-98/test/fasta.cpp:187:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   const size_t n = ( argc > 1 ) ? atoi( argv[1] ) : 512;
data/binaryen-98/test/lld/reserved_func_ptr.cpp:1:5:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
int atoi(const char *nptr);
data/binaryen-98/test/lld/reserved_func_ptr.cpp:7:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int fp_v = atoi(argv[1]);
data/binaryen-98/test/lld/reserved_func_ptr.cpp:8:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int fp_vi = atoi(argv[2]);
data/binaryen-98/test/lld/reserved_func_ptr.cpp:9:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int fp_iii = atoi(argv[3]);
data/binaryen-98/test/lld/reserved_func_ptr.cpp:10:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int fp_fffi = atoi(argv[4]);
data/binaryen-98/test/lld/reserved_func_ptr.cpp:11:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int fp_ddi = atoi(argv[5]);
data/binaryen-98/third_party/llvm-project/ConvertUTF.cpp:103:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char trailingBytesForUTF8[256] = {
data/binaryen-98/third_party/llvm-project/Error.cpp:159:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(ErrMsg, Tmp.data(), Tmp.size());
data/binaryen-98/third_party/llvm-project/MD5.cpp:206:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&buffer[used], Ptr, Size);
data/binaryen-98/third_party/llvm-project/MD5.cpp:210:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&buffer[used], Ptr, free);
data/binaryen-98/third_party/llvm-project/MD5.cpp:221:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buffer, Ptr, Size);
data/binaryen-98/third_party/llvm-project/MemoryBuffer.cpp:61:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(Memory, Data.data(), Data.size());
data/binaryen-98/third_party/llvm-project/MemoryBuffer.cpp:130:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(Buf->getBufferStart(), InputData.data(), InputData.size());
data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp:55:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char NumberBuffer[128];
data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp:148:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char NumberBuffer[kMaxWidth];
data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp:214:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[32];
data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp:242:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Buf[32];
data/binaryen-98/third_party/llvm-project/SmallVector.cpp:57:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(NewElts, this->BeginX, size() * TSize);
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/DenseMap.h:401:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(reinterpret_cast<void *>(getBuckets()), other.getBuckets(),
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/FunctionExtras.h:205:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(getInlineStorage(), RHS.getInlineStorage(), InlineStorageSize);
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Hashing.h:391:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buffer_ptr, value_data + offset, store_size);
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Hashing.h:404:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[64], *buffer_ptr = buffer;
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Hashing.h:495:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[64] = {};
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/Hashing.h:521:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buffer_ptr, &data, partial_store_size);
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallVector.h:294:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(reinterpret_cast<void *>(Dest), I, (E - I) * sizeof(T));
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallVector.h:305:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(reinterpret_cast<void *>(this->end()), &Elt, sizeof(T));
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringExtras.h:125:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Buffer[17];
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringExtras.h:224:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Buffer[21];
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringMap.h:197:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(StrBuffer, Key.data(), KeyLength);
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/bit.h:52:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(&to, &from, sizeof(To));
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/COFF.h:188:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Name[NameSize];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/COFF.h:271:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Name[NameSize];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/COFF.h:421:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char unused[2];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/COFF.h:458:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char unused2[12];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Dwarf.h:639:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static constexpr char Type[3] = "AT";
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Dwarf.h:644:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static constexpr char Type[5] = "FORM";
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Dwarf.h:649:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static constexpr char Type[4] = "IDX";
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/Dwarf.h:654:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static constexpr char Type[4] = "TAG";
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/ELF.h:61:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char e_ident[EI_NIDENT]; // ELF Identification bytes
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/ELF.h:87:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char e_ident[EI_NIDENT];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:530:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char segname[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:544:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char segname[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:556:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char sectname[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:557:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char segname[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:570:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char sectname[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:571:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char segname[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:837:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char data_owner[16]; // owner name for this LC_NOTE
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:1589:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char mmst_reg[10];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:1590:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char mmst_rsrv[6];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:1594:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char xmm_reg[16];
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/MachO.h:1636:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fpu_rsrv4[6 * 16];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:71:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char Name[16];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:72:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char LastModified[12];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:73:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char UID[6];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:74:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char GID[6];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:75:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char AccessMode[8];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:76:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char Size[10]; ///< Size of data, not including header or padding.
data/binaryen-98/third_party/llvm-project/include/llvm/Object/Archive.h:77:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char Terminator[2];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:54:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                 Magic[2];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:252:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ShortName[COFF::NameSize];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:271:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ShortName[COFF::NameSize];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:441:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Name[COFF::NameSize];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:485:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Unused1[2];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:492:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Unused1[4];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:494:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Unused2[6];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:496:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Unused3[2];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:505:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Unused1[10];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/COFF.h:535:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                 MBZ[12];
data/binaryen-98/third_party/llvm-project/include/llvm/Object/ELFTypes.h:457:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char e_ident[ELF::EI_NIDENT]; // ELF Identification bytes
data/binaryen-98/third_party/llvm-project/include/llvm/Support/AlignOf.h:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char arr[sizeof(T)];
data/binaryen-98/third_party/llvm-project/include/llvm/Support/AlignOf.h:39:44:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
template <typename T> union SizerImpl<T> { char arr[sizeof(T)]; };
data/binaryen-98/third_party/llvm-project/include/llvm/Support/AlignOf.h:49:50:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  alignas(::llvm::detail::AlignerImpl<T, Ts...>) char buffer[sizeof(
data/binaryen-98/third_party/llvm-project/include/llvm/Support/BinaryByteStream.h:120:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ::memcpy(DataPtr + Offset, Buffer.data(), Buffer.size());
data/binaryen-98/third_party/llvm-project/include/llvm/Support/BinaryByteStream.h:189:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ::memcpy(Data.data() + Offset, Buffer.data(), Buffer.size());
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:68:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&ret,
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:101:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(LLVM_ASSUME_ALIGNED(
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:126:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&val[0],
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:161:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&val[0],
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:196:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(LLVM_ASSUME_ALIGNED(
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:249:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    alignas(ALIGN) char buffer[sizeof(value_type)];
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:293:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char BitReverseTable256[256] = {
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:306:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char in[sizeof(Val)];
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:307:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char out[sizeof(Val)];
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:308:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(in, &Val, sizeof(Val));
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:627:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&D, &Bits, sizeof(Bits));
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:635:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&F, &Bits, sizeof(Bits));
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:645:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&Bits, &Double, sizeof(Double));
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MathExtras.h:655:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&Bits, &Float, sizeof(Float));
data/binaryen-98/third_party/llvm-project/include/llvm/Support/YAMLTraits.h:1766:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char missing_yaml_trait_for_type[sizeof(MissingTrait<T>)];
data/binaryen-98/third_party/llvm-project/include/llvm/Support/YAMLTraits.h:1872:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char missing_yaml_trait_for_type[sizeof(MissingTrait<T>)];
data/binaryen-98/third_party/llvm-project/include/llvm/Support/raw_ostream.h:189:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(OutBufCur, Str.data(), Size);
data/binaryen-98/third_party/llvm-project/raw_ostream.cpp:300:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(OutBufCur, Ptr, Size);
data/binaryen-98/third_party/llvm-project/raw_ostream.cpp:684:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(OS.data() + Offset, Ptr, Size);
data/binaryen-98/src/binaryen-c.cpp:3690:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(output, ctemp, outputSize);
data/binaryen-98/src/binaryen-c.cpp:3735:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(cout, out.c_str(), len);
data/binaryen-98/src/binaryen-c.cpp:3746:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    parser.read();
data/binaryen-98/src/cfg/Relooper.cpp:974:38:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return wasm::ExpressionAnalyzer::equal(A, B);
data/binaryen-98/src/dataflow/graph.h:168:39:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  Node* makeZeroComp(Node* node, bool equal, Expression* origin) {
data/binaryen-98/src/dataflow/graph.h:177:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      Abstract::getBinary(type, equal ? Abstract::Eq : Abstract::Ne),
data/binaryen-98/src/dataflow/node.h:181:34:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if (!ExpressionAnalyzer::equal(expr, other.expr)) {
data/binaryen-98/src/emscripten-optimizer/istring.h:158:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t size() const { return str ? strlen(str) : 0; }
data/binaryen-98/src/emscripten-optimizer/istring.h:191:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int size = strlen(init) + 1;
data/binaryen-98/src/emscripten-optimizer/istring.h:194:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(curr, init, size);
data/binaryen-98/src/emscripten-optimizer/parser.h:334:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size = strlen(str.str);
data/binaryen-98/src/emscripten-optimizer/parser.h:1127:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    allSize = strlen(src);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:606:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(s);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:608:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer + used, s, len + 1);
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:1068:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      ret = strlen(storage_e) < strlen(storage_f) ? storage_e : storage_f;
data/binaryen-98/src/emscripten-optimizer/simple_ast.h:1068:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      ret = strlen(storage_e) < strlen(storage_f) ? storage_e : storage_f;
data/binaryen-98/src/ir/function-utils.h:30:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
inline bool equal(Function* left, Function* right) {
data/binaryen-98/src/ir/function-utils.h:43:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return ExpressionAnalyzer::equal(left->body, right->body);
data/binaryen-98/src/ir/stack-utils.cpp:78:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::equal(results.end() - checked,
data/binaryen-98/src/ir/stack-utils.cpp:93:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    std::equal(params.begin(),
data/binaryen-98/src/ir/stack-utils.cpp:103:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    std::equal(results.begin(),
data/binaryen-98/src/ir/utils.h:61:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  static bool equal(Expression* left, Expression* right) {
data/binaryen-98/src/passes/CodeFolding.cpp:222:29:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if (ExpressionAnalyzer::equal(curr->ifTrue, curr->ifFalse)) {
data/binaryen-98/src/passes/CodeFolding.cpp:242:34:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            !ExpressionAnalyzer::equal(other, block->list.back())) {
data/binaryen-98/src/passes/CodeFolding.cpp:385:34:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if (!ExpressionAnalyzer::equal(item, getMergeable(tail, num))) {
data/binaryen-98/src/passes/CodeFolding.cpp:642:54:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                                 ExpressionAnalyzer::equal(item, first)) {
data/binaryen-98/src/passes/CodeFolding.cpp:660:72:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                                           return !ExpressionAnalyzer::equal(
data/binaryen-98/src/passes/DuplicateFunctionElimination.cpp:81:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (FunctionUtils::equal(first, second)) {
data/binaryen-98/src/passes/LocalCSE.cpp:77:34:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      return ExpressionAnalyzer::equal(a.hashed.expr, b.hashed.expr);
data/binaryen-98/src/passes/OptimizeInstructions.cpp:638:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if (ExpressionAnalyzer::equal(binary->left, binary->right)) {
data/binaryen-98/src/passes/OptimizeInstructions.cpp:688:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            ExpressionAnalyzer::equal(iff->ifTrue, iff->ifFalse)) {
data/binaryen-98/src/passes/OptimizeInstructions.cpp:955:31:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
          ExpressionAnalyzer::equal(ifTrue, ifFalse)) {
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1195:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            ExpressionAnalyzer::equal(left->left, right->left) &&
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1196:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            ExpressionAnalyzer::equal(left->right, right->right) &&
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1620:37:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (ExpressionAnalyzer::equal(inner->left, outer->left)) {
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1634:37:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (ExpressionAnalyzer::equal(inner->right, outer->left) &&
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1663:37:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (ExpressionAnalyzer::equal(inner->right, outer->right)) {
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1679:37:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (ExpressionAnalyzer::equal(inner->left, outer->right) &&
data/binaryen-98/src/passes/OptimizeInstructions.cpp:1725:31:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (ExpressionAnalyzer::equal(memCopy->dest, memCopy->source)) {
data/binaryen-98/src/passes/RemoveUnusedBrs.cpp:1217:38:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                 ExpressionAnalyzer::equal(
data/binaryen-98/src/passes/RoundTrip.cpp:44:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    parser.read();
data/binaryen-98/src/passes/SimplifyGlobals.cpp:54:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  std::atomic<bool> read;
data/binaryen-98/src/passes/SimplifyGlobals.cpp:257:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (!info.imported && !info.exported && !info.read) {
data/binaryen-98/src/support/archive.cpp:69:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (data.size() < strlen(magic) ||
data/binaryen-98/src/support/archive.cpp:70:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      memcmp(data.data(), magic, strlen(magic))) {
data/binaryen-98/src/support/archive.cpp:199:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  auto* loc = (const uint8_t*)data.data() + strlen(magic);
data/binaryen-98/src/support/command-line.cpp:161:9:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if (equal != std::string::npos) {
data/binaryen-98/src/support/command-line.cpp:163:47:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      currentOption = currentOption.substr(0, equal);
data/binaryen-98/src/support/debug.cpp:42:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t end = strlen(types);
data/binaryen-98/src/support/file.cpp:65:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  infile.read(&input[0], insize);
data/binaryen-98/src/tools/wasm-ctor-eval.cpp:458:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      reader.read(options.extra["infile"], wasm);
data/binaryen-98/src/tools/wasm-emscripten-finalize.cpp:214:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    reader.read(infile, wasm, inputSourceMapFilename);
data/binaryen-98/src/tools/wasm-metadce.cpp:503:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      reader.read(options.extra["infile"], wasm);
data/binaryen-98/src/tools/wasm-opt.cpp:235:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      reader.read(options.extra["infile"], wasm, inputSourceMapFilename);
data/binaryen-98/src/tools/wasm-reduce.cpp:347:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    reader.read(working, *module);
data/binaryen-98/src/tools/wasm2js.cpp:961:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      reader.read(input, wasm, "");
data/binaryen-98/src/wasm-binary.h:106:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  LEB<T, MiniT>& read(std::function<MiniT()> get) {
data/binaryen-98/src/wasm-binary.h:1272:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  void read();
data/binaryen-98/src/wasm-io.h:47:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  read(std::string filename, Module& wasm, std::string sourceMapFilename = "");
data/binaryen-98/src/wasm/wasm-binary.cpp:881:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int32_t size = strlen(name);
data/binaryen-98/src/wasm/wasm-binary.cpp:904:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int32_t size = strlen(name);
data/binaryen-98/src/wasm/wasm-binary.cpp:936:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  emitBuffer(str, strlen(str) + 1);
data/binaryen-98/src/wasm/wasm-binary.cpp:981:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void WasmBinaryBuilder::read() {
data/binaryen-98/src/wasm/wasm-binary.cpp:1087:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read > payloadLen) {
data/binaryen-98/src/wasm/wasm-binary.cpp:1090:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  payloadLen -= read;
data/binaryen-98/src/wasm/wasm-binary.cpp:1190:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret.read([&]() { return getInt8(); });
data/binaryen-98/src/wasm/wasm-binary.cpp:1198:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret.read([&]() { return getInt8(); });
data/binaryen-98/src/wasm/wasm-binary.cpp:1206:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret.read([&]() { return (int8_t)getInt8(); });
data/binaryen-98/src/wasm/wasm-binary.cpp:1214:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret.read([&]() { return (int8_t)getInt8(); });
data/binaryen-98/src/wasm/wasm-binary.cpp:1721:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(name);
data/binaryen-98/src/wasm/wasm-io.cpp:59:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  parser.read();
data/binaryen-98/src/wasm/wasm-io.cpp:78:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  infile.read(buffer, 4);
data/binaryen-98/src/wasm/wasm-io.cpp:84:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void ModuleReader::read(std::string filename,
data/binaryen-98/src/wasm/wasm-s-parser.cpp:339:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (auto size = strlen(str)) {
data/binaryen-98/src/wasm/wasm-s-parser.cpp:344:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    binaryBuilder.read();
data/binaryen-98/src/wasm/wasm-s-parser.cpp:1340:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  auto size = strlen(str);
data/binaryen-98/src/wasm/wasm-s-parser.cpp:2246:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (auto size = strlen(input)) {
data/binaryen-98/src/wasm/wasm-s-parser.cpp:2287:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (auto size = strlen(input)) {
data/binaryen-98/test/fasta.cpp:14:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen(x);
data/binaryen-98/test/fasta.cpp:97:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size = strlen( in );
data/binaryen-98/third_party/llvm-project/ErrorHandling.cpp:177:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ssize_t written = ::write(2, OOMMessage, strlen(OOMMessage));
data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp:197:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        NegativeZero[strlen(NegativeZero) - 4] = 'E';
data/binaryen-98/third_party/llvm-project/NativeFormatting.cpp:208:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        NegativeZero[strlen(NegativeZero) - 4] = 'E';
data/binaryen-98/third_party/llvm-project/Path.cpp:904:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    BytesRead = read(ReadFD, Buf, BufSize);
data/binaryen-98/third_party/llvm-project/Path.cpp:962:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    BytesRead = read(FD, Buf.data(), BufSize);
data/binaryen-98/third_party/llvm-project/YAMLTraits.cpp:810:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (key.size() < strlen(spaces))
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/ArrayRef.h:173:19:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      return std::equal(begin(), end(), RHS.begin());
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/STLExtras.h:1312:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
         std::equal(adl_begin(Range) + 1, adl_end(Range), adl_begin(Range)));
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/SmallVector.h:655:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return std::equal(this->begin(), this->end(), RHS.begin());
data/binaryen-98/third_party/llvm-project/include/llvm/ADT/StringExtras.h:349:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
inline size_t join_one_item_size(const char *S) { return S ? ::strlen(S) : 0; }
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/ELF.h:77:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0;
data/binaryen-98/third_party/llvm-project/include/llvm/BinaryFormat/ELF.h:103:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0;
data/binaryen-98/third_party/llvm-project/include/llvm/MC/SubtargetFeature.h:149:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return std::equal(std::begin(Bits), std::end(Bits), std::begin(RHS.Bits));
data/binaryen-98/third_party/llvm-project/include/llvm/Object/ELFTypes.h:474:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return (memcmp(e_ident, ELF::ElfMagic, strlen(ELF::ElfMagic))) == 0;
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:65:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
inline value_type read(const void *memory, endianness endian) {
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:78:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
inline value_type read(const void *memory) {
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:79:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<value_type, alignment>(memory, endian);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:86:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  value_type ret = read<value_type, alignment>(memory, endian);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:122:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read<value_type, endian, alignment>(memory);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:218:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return endian::read<value_type, endian, alignment>(
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:257:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      return endian::read<value_type, endian, alignment>(Ptr);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:354:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
template <typename T> inline T read(const void *P, endianness E) {
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:355:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<T, unaligned>(P, E);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:358:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
template <typename T, endianness E> inline T read(const void *P) {
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:363:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<uint16_t>(P, E);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:366:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<uint32_t>(P, E);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:369:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<uint64_t>(P, E);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:373:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<uint16_t, E>(P);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:376:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<uint32_t, E>(P);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/Endian.h:379:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read<uint64_t, E>(P);
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MD5.h:69:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      return endian::read<uint64_t, little, unaligned>(Bytes.data());
data/binaryen-98/third_party/llvm-project/include/llvm/Support/MD5.h:74:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      return endian::read<uint64_t, little, unaligned>(Bytes.data() + 8);

ANALYSIS SUMMARY:

Hits = 315
Lines analyzed = 202258 in approximately 4.61 seconds (43883 lines/second)
Physical Source Lines of Code (SLOC) = 143624
Hits@level = [0]  77 [1] 112 [2] 157 [3]  18 [4]  16 [5]  12
Hits@level+ = [0+] 392 [1+] 315 [2+] 203 [3+]  46 [4+]  28 [5+]  12
Hits/KSLOC@level+ = [0+] 2.72935 [1+] 2.19323 [2+] 1.41341 [3+] 0.320281 [4+] 0.194953 [5+] 0.0835515
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.