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/yosys-0.9/backends/aiger/aiger.cc
Examining data/yosys-0.9/backends/blif/blif.cc
Examining data/yosys-0.9/backends/btor/btor.cc
Examining data/yosys-0.9/backends/edif/edif.cc
Examining data/yosys-0.9/backends/firrtl/firrtl.cc
Examining data/yosys-0.9/backends/ilang/ilang_backend.cc
Examining data/yosys-0.9/backends/ilang/ilang_backend.h
Examining data/yosys-0.9/backends/intersynth/intersynth.cc
Examining data/yosys-0.9/backends/json/json.cc
Examining data/yosys-0.9/backends/protobuf/protobuf.cc
Examining data/yosys-0.9/backends/simplec/simplec.cc
Examining data/yosys-0.9/backends/simplec/test00_tb.c
Examining data/yosys-0.9/backends/smt2/smt2.cc
Examining data/yosys-0.9/backends/smv/smv.cc
Examining data/yosys-0.9/backends/spice/spice.cc
Examining data/yosys-0.9/backends/table/table.cc
Examining data/yosys-0.9/backends/verilog/verilog_backend.cc
Examining data/yosys-0.9/examples/cxx-api/demomain.cc
Examining data/yosys-0.9/examples/cxx-api/evaldemo.cc
Examining data/yosys-0.9/frontends/aiger/aigerparse.cc
Examining data/yosys-0.9/frontends/aiger/aigerparse.h
Examining data/yosys-0.9/frontends/ast/ast.cc
Examining data/yosys-0.9/frontends/ast/ast.h
Examining data/yosys-0.9/frontends/ast/dpicall.cc
Examining data/yosys-0.9/frontends/ast/simplify.cc
Examining data/yosys-0.9/frontends/ast/genrtlil.cc
Examining data/yosys-0.9/frontends/blif/blifparse.cc
Examining data/yosys-0.9/frontends/blif/blifparse.h
Examining data/yosys-0.9/frontends/ilang/ilang_frontend.cc
Examining data/yosys-0.9/frontends/ilang/ilang_frontend.h
Examining data/yosys-0.9/frontends/json/jsonparse.cc
Examining data/yosys-0.9/frontends/liberty/liberty.cc
Examining data/yosys-0.9/frontends/verific/verific.cc
Examining data/yosys-0.9/frontends/verific/verific.h
Examining data/yosys-0.9/frontends/verific/verificsva.cc
Examining data/yosys-0.9/frontends/verilog/const2ast.cc
Examining data/yosys-0.9/frontends/verilog/preproc.cc
Examining data/yosys-0.9/frontends/verilog/verilog_frontend.cc
Examining data/yosys-0.9/frontends/verilog/verilog_frontend.h
Examining data/yosys-0.9/kernel/bitpattern.h
Examining data/yosys-0.9/kernel/calc.cc
Examining data/yosys-0.9/kernel/cellaigs.cc
Examining data/yosys-0.9/kernel/cellaigs.h
Examining data/yosys-0.9/kernel/celledges.cc
Examining data/yosys-0.9/kernel/celledges.h
Examining data/yosys-0.9/kernel/celltypes.h
Examining data/yosys-0.9/kernel/consteval.h
Examining data/yosys-0.9/kernel/cost.h
Examining data/yosys-0.9/kernel/hashlib.h
Examining data/yosys-0.9/kernel/macc.h
Examining data/yosys-0.9/kernel/modtools.h
Examining data/yosys-0.9/kernel/register.cc
Examining data/yosys-0.9/kernel/register.h
Examining data/yosys-0.9/kernel/rtlil.cc
Examining data/yosys-0.9/kernel/rtlil.h
Examining data/yosys-0.9/kernel/satgen.h
Examining data/yosys-0.9/kernel/sigtools.h
Examining data/yosys-0.9/kernel/utils.h
Examining data/yosys-0.9/kernel/yosys.h
Examining data/yosys-0.9/kernel/driver.cc
Examining data/yosys-0.9/kernel/log.cc
Examining data/yosys-0.9/kernel/log.h
Examining data/yosys-0.9/kernel/yosys.cc
Examining data/yosys-0.9/libs/bigint/BigInteger.cc
Examining data/yosys-0.9/libs/bigint/BigIntegerAlgorithms.cc
Examining data/yosys-0.9/libs/bigint/BigIntegerUtils.cc
Examining data/yosys-0.9/libs/bigint/BigUnsigned.cc
Examining data/yosys-0.9/libs/bigint/BigUnsignedInABase.cc
Examining data/yosys-0.9/libs/bigint/sample.cc
Examining data/yosys-0.9/libs/bigint/testsuite.cc
Examining data/yosys-0.9/libs/ezsat/demo_bit.cc
Examining data/yosys-0.9/libs/ezsat/demo_cmp.cc
Examining data/yosys-0.9/libs/ezsat/demo_vec.cc
Examining data/yosys-0.9/libs/ezsat/ezminisat.cc
Examining data/yosys-0.9/libs/ezsat/ezminisat.h
Examining data/yosys-0.9/libs/ezsat/ezsat.cc
Examining data/yosys-0.9/libs/ezsat/ezsat.h
Examining data/yosys-0.9/libs/ezsat/puzzle3d.cc
Examining data/yosys-0.9/libs/ezsat/testbench.cc
Examining data/yosys-0.9/libs/minisat/Alg.h
Examining data/yosys-0.9/libs/minisat/Alloc.h
Examining data/yosys-0.9/libs/minisat/Dimacs.h
Examining data/yosys-0.9/libs/minisat/Heap.h
Examining data/yosys-0.9/libs/minisat/IntMap.h
Examining data/yosys-0.9/libs/minisat/IntTypes.h
Examining data/yosys-0.9/libs/minisat/Map.h
Examining data/yosys-0.9/libs/minisat/Options.cc
Examining data/yosys-0.9/libs/minisat/Options.h
Examining data/yosys-0.9/libs/minisat/ParseUtils.h
Examining data/yosys-0.9/libs/minisat/Queue.h
Examining data/yosys-0.9/libs/minisat/Rnd.h
Examining data/yosys-0.9/libs/minisat/SimpSolver.cc
Examining data/yosys-0.9/libs/minisat/SimpSolver.h
Examining data/yosys-0.9/libs/minisat/Solver.cc
Examining data/yosys-0.9/libs/minisat/Solver.h
Examining data/yosys-0.9/libs/minisat/SolverTypes.h
Examining data/yosys-0.9/libs/minisat/Sort.h
Examining data/yosys-0.9/libs/minisat/System.h
Examining data/yosys-0.9/libs/minisat/Vec.h
Examining data/yosys-0.9/libs/minisat/XAlloc.h
Examining data/yosys-0.9/libs/minisat/System.cc
Examining data/yosys-0.9/libs/sha1/sha1.cpp
Examining data/yosys-0.9/libs/sha1/sha1.h
Examining data/yosys-0.9/libs/subcircuit/demo.cc
Examining data/yosys-0.9/libs/subcircuit/scshell.cc
Examining data/yosys-0.9/libs/subcircuit/subcircuit.cc
Examining data/yosys-0.9/libs/subcircuit/subcircuit.h
Examining data/yosys-0.9/manual/CHAPTER_Prog/stubnets.cc
Examining data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c
Examining data/yosys-0.9/manual/PRESENTATION_Prog/my_cmd.cc
Examining data/yosys-0.9/misc/launcher.c
Examining data/yosys-0.9/passes/cmds/add.cc
Examining data/yosys-0.9/passes/cmds/blackbox.cc
Examining data/yosys-0.9/passes/cmds/bugpoint.cc
Examining data/yosys-0.9/passes/cmds/check.cc
Examining data/yosys-0.9/passes/cmds/chformal.cc
Examining data/yosys-0.9/passes/cmds/chtype.cc
Examining data/yosys-0.9/passes/cmds/connect.cc
Examining data/yosys-0.9/passes/cmds/connwrappers.cc
Examining data/yosys-0.9/passes/cmds/copy.cc
Examining data/yosys-0.9/passes/cmds/delete.cc
Examining data/yosys-0.9/passes/cmds/design.cc
Examining data/yosys-0.9/passes/cmds/edgetypes.cc
Examining data/yosys-0.9/passes/cmds/logcmd.cc
Examining data/yosys-0.9/passes/cmds/ltp.cc
Examining data/yosys-0.9/passes/cmds/plugin.cc
Examining data/yosys-0.9/passes/cmds/qwp.cc
Examining data/yosys-0.9/passes/cmds/rename.cc
Examining data/yosys-0.9/passes/cmds/scatter.cc
Examining data/yosys-0.9/passes/cmds/scc.cc
Examining data/yosys-0.9/passes/cmds/select.cc
Examining data/yosys-0.9/passes/cmds/setattr.cc
Examining data/yosys-0.9/passes/cmds/setundef.cc
Examining data/yosys-0.9/passes/cmds/show.cc
Examining data/yosys-0.9/passes/cmds/splice.cc
Examining data/yosys-0.9/passes/cmds/splitnets.cc
Examining data/yosys-0.9/passes/cmds/stat.cc
Examining data/yosys-0.9/passes/cmds/tee.cc
Examining data/yosys-0.9/passes/cmds/torder.cc
Examining data/yosys-0.9/passes/cmds/trace.cc
Examining data/yosys-0.9/passes/cmds/write_file.cc
Examining data/yosys-0.9/passes/cmds/cover.cc
Examining data/yosys-0.9/passes/equiv/equiv_add.cc
Examining data/yosys-0.9/passes/equiv/equiv_induct.cc
Examining data/yosys-0.9/passes/equiv/equiv_make.cc
Examining data/yosys-0.9/passes/equiv/equiv_mark.cc
Examining data/yosys-0.9/passes/equiv/equiv_miter.cc
Examining data/yosys-0.9/passes/equiv/equiv_opt.cc
Examining data/yosys-0.9/passes/equiv/equiv_purge.cc
Examining data/yosys-0.9/passes/equiv/equiv_remove.cc
Examining data/yosys-0.9/passes/equiv/equiv_simple.cc
Examining data/yosys-0.9/passes/equiv/equiv_status.cc
Examining data/yosys-0.9/passes/equiv/equiv_struct.cc
Examining data/yosys-0.9/passes/fsm/fsm.cc
Examining data/yosys-0.9/passes/fsm/fsm_detect.cc
Examining data/yosys-0.9/passes/fsm/fsm_expand.cc
Examining data/yosys-0.9/passes/fsm/fsm_export.cc
Examining data/yosys-0.9/passes/fsm/fsm_extract.cc
Examining data/yosys-0.9/passes/fsm/fsm_info.cc
Examining data/yosys-0.9/passes/fsm/fsm_map.cc
Examining data/yosys-0.9/passes/fsm/fsm_opt.cc
Examining data/yosys-0.9/passes/fsm/fsm_recode.cc
Examining data/yosys-0.9/passes/fsm/fsmdata.h
Examining data/yosys-0.9/passes/hierarchy/hierarchy.cc
Examining data/yosys-0.9/passes/hierarchy/submod.cc
Examining data/yosys-0.9/passes/hierarchy/uniquify.cc
Examining data/yosys-0.9/passes/memory/memory.cc
Examining data/yosys-0.9/passes/memory/memory_bram.cc
Examining data/yosys-0.9/passes/memory/memory_collect.cc
Examining data/yosys-0.9/passes/memory/memory_dff.cc
Examining data/yosys-0.9/passes/memory/memory_map.cc
Examining data/yosys-0.9/passes/memory/memory_memx.cc
Examining data/yosys-0.9/passes/memory/memory_nordff.cc
Examining data/yosys-0.9/passes/memory/memory_share.cc
Examining data/yosys-0.9/passes/memory/memory_unpack.cc
Examining data/yosys-0.9/passes/opt/muxpack.cc
Examining data/yosys-0.9/passes/opt/opt.cc
Examining data/yosys-0.9/passes/opt/opt_clean.cc
Examining data/yosys-0.9/passes/opt/opt_demorgan.cc
Examining data/yosys-0.9/passes/opt/opt_expr.cc
Examining data/yosys-0.9/passes/opt/opt_lut.cc
Examining data/yosys-0.9/passes/opt/opt_merge.cc
Examining data/yosys-0.9/passes/opt/opt_muxtree.cc
Examining data/yosys-0.9/passes/opt/opt_reduce.cc
Examining data/yosys-0.9/passes/opt/opt_rmdff.cc
Examining data/yosys-0.9/passes/opt/pmux2shiftx.cc
Examining data/yosys-0.9/passes/opt/rmports.cc
Examining data/yosys-0.9/passes/opt/share.cc
Examining data/yosys-0.9/passes/opt/wreduce.cc
Examining data/yosys-0.9/passes/pmgen/ice40_dsp.cc
Examining data/yosys-0.9/passes/pmgen/peepopt.cc
Examining data/yosys-0.9/passes/proc/proc.cc
Examining data/yosys-0.9/passes/proc/proc_arst.cc
Examining data/yosys-0.9/passes/proc/proc_clean.cc
Examining data/yosys-0.9/passes/proc/proc_dff.cc
Examining data/yosys-0.9/passes/proc/proc_dlatch.cc
Examining data/yosys-0.9/passes/proc/proc_init.cc
Examining data/yosys-0.9/passes/proc/proc_mux.cc
Examining data/yosys-0.9/passes/proc/proc_rmdead.cc
Examining data/yosys-0.9/passes/sat/assertpmux.cc
Examining data/yosys-0.9/passes/sat/async2sync.cc
Examining data/yosys-0.9/passes/sat/clk2fflogic.cc
Examining data/yosys-0.9/passes/sat/cutpoint.cc
Examining data/yosys-0.9/passes/sat/eval.cc
Examining data/yosys-0.9/passes/sat/expose.cc
Examining data/yosys-0.9/passes/sat/fmcombine.cc
Examining data/yosys-0.9/passes/sat/freduce.cc
Examining data/yosys-0.9/passes/sat/miter.cc
Examining data/yosys-0.9/passes/sat/mutate.cc
Examining data/yosys-0.9/passes/sat/sat.cc
Examining data/yosys-0.9/passes/sat/sim.cc
Examining data/yosys-0.9/passes/sat/supercover.cc
Examining data/yosys-0.9/passes/techmap/aigmap.cc
Examining data/yosys-0.9/passes/techmap/alumacc.cc
Examining data/yosys-0.9/passes/techmap/attrmap.cc
Examining data/yosys-0.9/passes/techmap/attrmvcp.cc
Examining data/yosys-0.9/passes/techmap/deminout.cc
Examining data/yosys-0.9/passes/techmap/dff2dffe.cc
Examining data/yosys-0.9/passes/techmap/dff2dffs.cc
Examining data/yosys-0.9/passes/techmap/dffinit.cc
Examining data/yosys-0.9/passes/techmap/dfflibmap.cc
Examining data/yosys-0.9/passes/techmap/dffsr2dff.cc
Examining data/yosys-0.9/passes/techmap/extract.cc
Examining data/yosys-0.9/passes/techmap/extract_counter.cc
Examining data/yosys-0.9/passes/techmap/extract_fa.cc
Examining data/yosys-0.9/passes/techmap/extract_reduce.cc
Examining data/yosys-0.9/passes/techmap/filterlib.cc
Examining data/yosys-0.9/passes/techmap/flowmap.cc
Examining data/yosys-0.9/passes/techmap/hilomap.cc
Examining data/yosys-0.9/passes/techmap/insbuf.cc
Examining data/yosys-0.9/passes/techmap/iopadmap.cc
Examining data/yosys-0.9/passes/techmap/libparse.cc
Examining data/yosys-0.9/passes/techmap/libparse.h
Examining data/yosys-0.9/passes/techmap/lut2mux.cc
Examining data/yosys-0.9/passes/techmap/maccmap.cc
Examining data/yosys-0.9/passes/techmap/muxcover.cc
Examining data/yosys-0.9/passes/techmap/nlutmap.cc
Examining data/yosys-0.9/passes/techmap/pmuxtree.cc
Examining data/yosys-0.9/passes/techmap/shregmap.cc
Examining data/yosys-0.9/passes/techmap/simplemap.cc
Examining data/yosys-0.9/passes/techmap/simplemap.h
Examining data/yosys-0.9/passes/techmap/techmap.cc
Examining data/yosys-0.9/passes/techmap/tribuf.cc
Examining data/yosys-0.9/passes/techmap/zinit.cc
Examining data/yosys-0.9/passes/techmap/abc.cc
Examining data/yosys-0.9/passes/tests/test_abcloop.cc
Examining data/yosys-0.9/passes/tests/test_autotb.cc
Examining data/yosys-0.9/passes/tests/test_cell.cc
Examining data/yosys-0.9/techlibs/achronix/synth_achronix.cc
Examining data/yosys-0.9/techlibs/anlogic/anlogic_determine_init.cc
Examining data/yosys-0.9/techlibs/anlogic/anlogic_eqn.cc
Examining data/yosys-0.9/techlibs/anlogic/synth_anlogic.cc
Examining data/yosys-0.9/techlibs/common/prep.cc
Examining data/yosys-0.9/techlibs/common/synth.cc
Examining data/yosys-0.9/techlibs/coolrunner2/coolrunner2_sop.cc
Examining data/yosys-0.9/techlibs/coolrunner2/synth_coolrunner2.cc
Examining data/yosys-0.9/techlibs/easic/synth_easic.cc
Examining data/yosys-0.9/techlibs/ecp5/ecp5_ffinit.cc
Examining data/yosys-0.9/techlibs/ecp5/synth_ecp5.cc
Examining data/yosys-0.9/techlibs/gowin/determine_init.cc
Examining data/yosys-0.9/techlibs/gowin/synth_gowin.cc
Examining data/yosys-0.9/techlibs/greenpak4/greenpak4_dffinv.cc
Examining data/yosys-0.9/techlibs/greenpak4/synth_greenpak4.cc
Examining data/yosys-0.9/techlibs/ice40/ice40_braminit.cc
Examining data/yosys-0.9/techlibs/ice40/ice40_ffinit.cc
Examining data/yosys-0.9/techlibs/ice40/ice40_ffssr.cc
Examining data/yosys-0.9/techlibs/ice40/ice40_opt.cc
Examining data/yosys-0.9/techlibs/ice40/ice40_unlut.cc
Examining data/yosys-0.9/techlibs/ice40/synth_ice40.cc
Examining data/yosys-0.9/techlibs/intel/synth_intel.cc
Examining data/yosys-0.9/techlibs/sf2/sf2_iobs.cc
Examining data/yosys-0.9/techlibs/sf2/synth_sf2.cc
Examining data/yosys-0.9/techlibs/xilinx/synth_xilinx.cc
Examining data/yosys-0.9/tests/tools/cmp_tbdata.c
Examining data/yosys-0.9/tests/unit/kernel/logTest.cc
Examining data/yosys-0.9/tests/unit/kernel/rtlilTest.cc

FINAL RESULTS:

data/yosys-0.9/kernel/yosys.cc:744:19:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	ssize_t buflen = readlink("/proc/self/exe", path, sizeof(path));
data/yosys-0.9/frontends/ast/ast.cc:458:4:  [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.
			fprintf(f, first ? "(" : ", ");
data/yosys-0.9/frontends/ast/ast.cc:462:3:  [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.
		fprintf(f, first ? "*\n" : ")\n");
data/yosys-0.9/frontends/blif/blifparse.cc:52:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(buffer+buffer_len, strbuf.c_str());
data/yosys-0.9/frontends/verilog/verilog_frontend.cc:608:7:  [4] (format) vsnprintf:
  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.
	p += vsnprintf(p, buffer + sizeof(buffer) - p, fmt, ap);
data/yosys-0.9/kernel/log.h:77:56:  [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.
void log(const char *format, ...)  YS_ATTRIBUTE(format(printf, 1, 2));
data/yosys-0.9/kernel/log.h:78:85:  [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.
void log_header(RTLIL::Design *design, const char *format, ...) YS_ATTRIBUTE(format(printf, 2, 3));
data/yosys-0.9/kernel/log.h:79:63:  [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.
void log_warning(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
data/yosys-0.9/kernel/log.h:82:109:  [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.
void log_file_warning(const std::string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4));
data/yosys-0.9/kernel/log.h:83:106:  [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.
void log_file_info(const std::string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4));
data/yosys-0.9/kernel/log.h:85:72:  [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.
void log_warning_noprefix(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
data/yosys-0.9/kernel/log.h:86:73:  [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.
YS_NORETURN void log_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2), noreturn);
data/yosys-0.9/kernel/log.h:87:102:  [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.
void log_file_error(const string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4), noreturn);
data/yosys-0.9/kernel/log.h:88:77:  [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.
YS_NORETURN void log_cmd_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2), noreturn);
data/yosys-0.9/kernel/yosys.cc:189:8:  [4] (format) vsnprintf:
  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.
		rc = vsnprintf(str, sz, fmt, apc);
data/yosys-0.9/kernel/yosys.cc:342:10:  [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.
		return system(command.c_str());
data/yosys-0.9/kernel/yosys.cc:344:12:  [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 *f = popen(command.c_str(), "r");
data/yosys-0.9/kernel/yosys.cc:450:9:  [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(filename.c_str(), is_exec ? X_OK : F_OK) == 0;
data/yosys-0.9/kernel/yosys.h:75:49:  [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.
         When building Yosys with a custom make system, make sure you set all the \
data/yosys-0.9/kernel/yosys.h:109: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.
#  define snprintf _snprintf
data/yosys-0.9/kernel/yosys.h:109:20:  [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 _snprintf
data/yosys-0.9/kernel/yosys.h:112:11:  [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.
#  define popen _popen
data/yosys-0.9/kernel/yosys.h:252:63:  [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.
std::string stringf(const char *fmt, ...) YS_ATTRIBUTE(format(printf, 1, 2));
data/yosys-0.9/libs/minisat/Options.cc:70:9:  [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.
        fprintf(stderr, usage, argv[0]);
data/yosys-0.9/libs/minisat/Options.h:285:13:  [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.
            fprintf(stderr, "%4" PRIi64 , range.begin);
data/yosys-0.9/libs/minisat/Options.h:291:13:  [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.
            fprintf(stderr, "%4" PRIi64 , range.end);
data/yosys-0.9/libs/subcircuit/scshell.cc:39:3:  [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.
		printf(graph == NULL || cmdBuffer[0] == "endgraph" ? ">" : ">  ");
data/yosys-0.9/libs/subcircuit/subcircuit.cc:32:21:  [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.
#  define my_printf printf
data/yosys-0.9/misc/launcher.c:70:5:  [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.
    fprintf(stderr, format, data);
data/yosys-0.9/misc/launcher.c:263:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmdline, "%s", executable);
data/yosys-0.9/misc/launcher.c:266:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(cmdline+len, " %s", args[counter]);
data/yosys-0.9/misc/launcher.c:291:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(script, (GUI ? "-script.pyw" : "-script.py"));
data/yosys-0.9/misc/launcher.c:342:9:  [4] (shell) execv:
  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.
        execv(ptr, (char * const *)(newargs));
data/yosys-0.9/passes/cmds/logcmd.cc:76: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.
		if (to_stdout) fprintf(stdout, (newline ? "%s\n" : "%s"), text.c_str());
data/yosys-0.9/passes/cmds/logcmd.cc:77: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.
		if (to_stderr) fprintf(stderr, (newline ? "%s\n" : "%s"), text.c_str());
data/yosys-0.9/passes/cmds/select.cc:1356:77:  [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 LOG_OBJECT(...) { if (list_mode) log(__VA_ARGS__); if (f != NULL) fprintf(f, __VA_ARGS__); total_count++; }
data/yosys-0.9/frontends/verific/verific.cc:1858: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.
	const char *e = getenv("YOSYS_NOVERIFIC");
data/yosys-0.9/kernel/driver.cc:53:5:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
int getopt(int argc, char **argv, const char *optstring)
data/yosys-0.9/kernel/driver.cc:202:6:  [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("HOME") != NULL) {
data/yosys-0.9/kernel/driver.cc:203:53:  [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.
		yosys_history_file = stringf("%s/.yosys_history", getenv("HOME"));
data/yosys-0.9/kernel/driver.cc:321:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "MXAQTVSgm:f:Hh:b:o:p:l:L:qv:tds:c:W:w:e:D:P:E:")) != -1)
data/yosys-0.9/kernel/driver.cc:631:6:  [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("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE"))
data/yosys-0.9/kernel/driver.cc:631: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.
	if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE"))
data/yosys-0.9/kernel/driver.cc:636: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("YOSYS_COVER_DIR")) {
data/yosys-0.9/kernel/driver.cc:637:55:  [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.
			filename = stringf("%s/yosys_cover_%d_XXXXXX.txt", getenv("YOSYS_COVER_DIR"), getpid());
data/yosys-0.9/kernel/driver.cc:640: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.
			filename = getenv("YOSYS_COVER_FILE");
data/yosys-0.9/kernel/yosys.cc:656:37:  [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.
		filename = filename.replace(0, 1, getenv("HOME"));
data/yosys-0.9/libs/subcircuit/demo.cc:87:7:  [3] (random) lrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		if (lrand48() % (i < 20 ? 3 : 2) != 0)
data/yosys-0.9/libs/subcircuit/demo.cc:90:40:  [3] (random) lrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		const std::string &id_left = cellIds[lrand48() % cellIds.size()];
data/yosys-0.9/libs/subcircuit/demo.cc:91:41:  [3] (random) lrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		const std::string &id_right = cellIds[lrand48() % cellIds.size()];
data/yosys-0.9/passes/cmds/show.cc:691:50:  [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.
		std::string prefix = stringf("%s/.yosys_show", getenv("HOME") ? getenv("HOME") : ".");
data/yosys-0.9/passes/cmds/show.cc:691:67:  [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.
		std::string prefix = stringf("%s/.yosys_show", getenv("HOME") ? getenv("HOME") : ".");
data/yosys-0.9/backends/aiger/aiger.cc:782:9:  [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).
			mapf.open(map_filename.c_str(), std::ofstream::trunc);
data/yosys-0.9/backends/edif/edif.cc:365:8:  [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 digit_str[2] = { "0123456789abcdef"[digit_value], 0 };
data/yosys-0.9/backends/ilang/ilang_backend.cc:493:8:  [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).
			ff->open(filename.c_str(), append ? std::ofstream::app : std::ofstream::trunc);
data/yosys-0.9/backends/intersynth/intersynth.cc:107:6:  [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).
			f.open(filename.c_str());
data/yosys-0.9/backends/json/json.cc:538:8:  [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).
			ff->open(filename.c_str(), std::ofstream::trunc);
data/yosys-0.9/backends/protobuf/protobuf.cc:341:8:  [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).
			ff->open(filename.c_str(), std::ofstream::trunc);
data/yosys-0.9/backends/smt2/smt2.cc:1432:16:  [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).
				template_f.open(args[++argidx]);
data/yosys-0.9/backends/smv/smv.cc:726:16:  [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).
				template_f.open(args[++argidx]);
data/yosys-0.9/backends/verilog/verilog_backend.cc:63:12:  [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 num = atoi(str+2);
data/yosys-0.9/backends/verilog/verilog_backend.cc:1399: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 str[16];
data/yosys-0.9/frontends/ast/genrtlil.cc:1546: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 buf[100];
data/yosys-0.9/frontends/ast/simplify.cc:277:8:  [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 tmp[128];
data/yosys-0.9/frontends/ast/simplify.cc:286:8:  [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 tmp[128];
data/yosys-0.9/frontends/ast/simplify.cc:2770:4:  [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).
	f.open(mem_filename.c_str());
data/yosys-0.9/frontends/blif/blifparse.cc:75:70:  [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).
		return std::pair<RTLIL::IdString, int>("\\" + name.substr(0, pos), atoi(name.c_str() + pos+1)+1);
data/yosys-0.9/frontends/blif/blifparse.cc:106: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 num = atoi(num_str.c_str()) & 0x0fffffff;
data/yosys-0.9/frontends/liberty/liberty.cc:433: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).
				bit_width = atoi(child->value.c_str());
data/yosys-0.9/frontends/liberty/liberty.cc:436: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).
				bit_from = atoi(child->value.c_str());
data/yosys-0.9/frontends/liberty/liberty.cc:439: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).
				bit_to = atoi(child->value.c_str());
data/yosys-0.9/frontends/verific/verific.cc:1861:6:  [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).
	if (atoi(e) == 0)
data/yosys-0.9/frontends/verific/verific.cc:2247: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).
					verific_sva_fsm_limit = atoi(args[++argidx].c_str());
data/yosys-0.9/frontends/verific/verificsva.cc:1087:19:  [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 sva_low = atoi(sva_low_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1088: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).
				int sva_high = atoi(sva_high_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1152: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 sva_low = atoi(sva_low_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1166: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 sva_low = atoi(sva_low_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1167: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).
		int sva_high = atoi(sva_high_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1272: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).
			int sva_low = atoi(sva_low_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1273:19:  [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 sva_high = atoi(sva_high_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1330: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).
			int sva_low = atoi(sva_low_s);
data/yosys-0.9/frontends/verific/verificsva.cc:1331:19:  [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 sva_high = atoi(sva_high_s);
data/yosys-0.9/frontends/verilog/preproc.cc:204:2:  [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[513];
data/yosys-0.9/frontends/verilog/preproc.cc:373:7:  [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).
			ff.open(fixed_fn.c_str());
data/yosys-0.9/frontends/verilog/preproc.cc:396:8:  [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).
				ff.open(fixed_fn);
data/yosys-0.9/frontends/verilog/preproc.cc:404:9:  [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).
					ff.open(fixed_fn);
data/yosys-0.9/frontends/verilog/verilog_frontend.cc:605:2:  [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/yosys-0.9/kernel/driver.cc:373:24:  [2] (misc) fopen:
  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).
			log_files.push_back(fopen(optarg, "wt"));
data/yosys-0.9/kernel/driver.cc:390: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).
			log_verbose_level = atoi(optarg);
data/yosys-0.9/kernel/driver.cc:527:13:  [2] (misc) fopen:
  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).
		FILE *f = fopen(depsfile.c_str(), "wt");
data/yosys-0.9/kernel/driver.cc:565:9:  [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).
		statm.open(stringf("/proc/%lld/statm", (long long)getpid()));
data/yosys-0.9/kernel/driver.cc:643:7:  [2] (misc) fopen:
  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).
		f = fopen(filename.c_str(), "a+");
data/yosys-0.9/kernel/register.cc:410: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 block[4096];
data/yosys-0.9/kernel/register.cc:433:8:  [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).
			ff->open(filename.c_str());
data/yosys-0.9/kernel/register.cc:550:7:  [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).
		ff->open(filename.c_str(), std::ofstream::trunc);
data/yosys-0.9/kernel/register.cc:675:13:  [2] (misc) fopen:
  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).
		FILE *f = fopen(stringf("cmd_%s.in", cmd.c_str()).c_str(), "wt");
data/yosys-0.9/kernel/register.cc:729:15:  [2] (misc) fopen:
  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).
				FILE *f = fopen("command-reference-manual.tex", "wt");
data/yosys-0.9/kernel/register.cc:742:15:  [2] (misc) fopen:
  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).
				FILE *f = fopen("templates/cmd_index.in", "wt");
data/yosys-0.9/kernel/rtlil.cc:814: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 portname[3] = { '\\', *p, 0 };
data/yosys-0.9/kernel/rtlil.cc:3922:13:  [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 a = atoi(index_tokens.at(0).c_str());
data/yosys-0.9/kernel/rtlil.cc:3928:13:  [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 a = atoi(index_tokens.at(0).c_str());
data/yosys-0.9/kernel/rtlil.cc:3929:13:  [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 b = atoi(index_tokens.at(1).c_str());
data/yosys-0.9/kernel/yosys.cc:349:2:  [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 logbuf[128];
data/yosys-0.9/kernel/yosys.cc:373: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 longpath[MAX_PATH + 1];
data/yosys-0.9/kernel/yosys.cc:374: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 shortpath[MAX_PATH + 1];
data/yosys-0.9/kernel/yosys.cc:377:3:  [2] (buffer) TCHAR:
  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.
		TCHAR shortpath[MAX_PATH + 1];
data/yosys-0.9/kernel/yosys.cc:607:9:  [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 buffer[100];
data/yosys-0.9/kernel/yosys.cc:743:2:  [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 path[PATH_MAX];
data/yosys-0.9/kernel/yosys.cc:788:2:  [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 longpath[MAX_PATH + 1];
data/yosys-0.9/kernel/yosys.cc:789:2:  [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 shortpath[MAX_PATH + 1];
data/yosys-0.9/kernel/yosys.cc:792:2:  [2] (buffer) TCHAR:
  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.
	TCHAR shortpath[MAX_PATH + 1];
data/yosys-0.9/kernel/yosys.cc:852:2:  [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 block[4096];
data/yosys-0.9/kernel/yosys.cc:943:8:  [2] (misc) fopen:
  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).
			f = fopen(filename.c_str(), "r");
data/yosys-0.9/kernel/yosys.cc:1153:2:  [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 command_buffer[4096];
data/yosys-0.9/libs/ezsat/ezsat.cc:35:2:  [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/yosys-0.9/libs/ezsat/puzzle3d.cc:67:2:  [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/yosys-0.9/libs/minisat/Solver.cc:947:15:  [2] (misc) fopen:
  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).
    FILE* f = fopen(file, "wr");
data/yosys-0.9/libs/minisat/System.cc:40: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[256];
data/yosys-0.9/libs/minisat/System.cc:44:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(name, "/proc/%d/statm", pid);
data/yosys-0.9/libs/minisat/System.cc:45:16:  [2] (misc) fopen:
  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).
    FILE* in = fopen(name, "rb");
data/yosys-0.9/libs/minisat/System.cc:58: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[256];
data/yosys-0.9/libs/minisat/System.cc:61:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(name, "/proc/%d/status", pid);
data/yosys-0.9/libs/minisat/System.cc:62:16:  [2] (misc) fopen:
  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).
    FILE* in = fopen(name, "rb");
data/yosys-0.9/libs/subcircuit/demo.cc:44: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 id[100];
data/yosys-0.9/libs/subcircuit/demo.cc: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 id[100];
data/yosys-0.9/libs/subcircuit/demo.cc: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 id[100];
data/yosys-0.9/libs/subcircuit/scshell.cc:8:2:  [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[4096];
data/yosys-0.9/libs/subcircuit/scshell.cc:54: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).
						width = atoi(cmdBuffer[++i].c_str());
data/yosys-0.9/libs/subcircuit/scshell.cc:56: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).
						minWidth = atoi(cmdBuffer[++i].c_str());
data/yosys-0.9/libs/subcircuit/scshell.cc:68:57:  [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).
				graph->createConnection(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()), cmdBuffer[4], cmdBuffer[5], atoi(cmdBuffer[6].c_str()));
data/yosys-0.9/libs/subcircuit/scshell.cc:68:113:  [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).
				graph->createConnection(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()), cmdBuffer[4], cmdBuffer[5], atoi(cmdBuffer[6].c_str()));
data/yosys-0.9/libs/subcircuit/scshell.cc:73:57:  [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).
				graph->createConnection(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()), cmdBuffer[4], cmdBuffer[5], atoi(cmdBuffer[6].c_str()), atoi(cmdBuffer[7].c_str()));
data/yosys-0.9/libs/subcircuit/scshell.cc:73:113:  [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).
				graph->createConnection(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()), cmdBuffer[4], cmdBuffer[5], atoi(cmdBuffer[6].c_str()), atoi(cmdBuffer[7].c_str()));
data/yosys-0.9/libs/subcircuit/scshell.cc:73:141:  [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).
				graph->createConnection(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()), cmdBuffer[4], cmdBuffer[5], atoi(cmdBuffer[6].c_str()), atoi(cmdBuffer[7].c_str()));
data/yosys-0.9/libs/subcircuit/scshell.cc:78:74:  [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 constValue = cmdBuffer[4].size() > 1 && cmdBuffer[4][0] == '#' ? atoi(cmdBuffer[4].c_str()+1) : cmdBuffer[4][0];
data/yosys-0.9/libs/subcircuit/scshell.cc:79:55:  [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).
				graph->createConstant(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()), constValue);
data/yosys-0.9/libs/subcircuit/scshell.cc:84:55:  [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).
				graph->createConstant(cmdBuffer[1], cmdBuffer[2], atoi(cmdBuffer[3].c_str()));
data/yosys-0.9/libs/subcircuit/scshell.cc:93:13:  [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).
						bit = atoi(cmdBuffer[++i].c_str());
data/yosys-0.9/libs/subcircuit/scshell.cc:125:80:  [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 needleConstValue = cmdBuffer[1].size() > 1 && cmdBuffer[1][0] == '#' ? atoi(cmdBuffer[1].c_str()+1) : cmdBuffer[1][0];
data/yosys-0.9/libs/subcircuit/scshell.cc:126:82:  [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 haystackConstValue = cmdBuffer[2].size() > 1 && cmdBuffer[2][0] == '#' ? atoi(cmdBuffer[2].c_str()+1) : cmdBuffer[2][0];
data/yosys-0.9/libs/subcircuit/scshell.cc:158:47:  [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).
					allowOverlap = cmdBuffer[3] == "true" || atoi(cmdBuffer[3].c_str()) ? true : false;
data/yosys-0.9/libs/subcircuit/scshell.cc:160: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).
					maxSolutions = atoi(cmdBuffer[4].c_str());
data/yosys-0.9/libs/subcircuit/scshell.cc:167: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).
				solver.mine(mineResults, atoi(cmdBuffer[1].c_str()), atoi(cmdBuffer[2].c_str()),
data/yosys-0.9/libs/subcircuit/scshell.cc:167: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).
				solver.mine(mineResults, atoi(cmdBuffer[1].c_str()), atoi(cmdBuffer[2].c_str()),
data/yosys-0.9/libs/subcircuit/scshell.cc:168:7:  [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).
						atoi(cmdBuffer[3].c_str()), cmdBuffer.size() == 5 ? atoi(cmdBuffer[4].c_str()) : -1);
data/yosys-0.9/libs/subcircuit/scshell.cc:168:59:  [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).
						atoi(cmdBuffer[3].c_str()), cmdBuffer.size() == 5 ? atoi(cmdBuffer[4].c_str()) : -1);
data/yosys-0.9/libs/subcircuit/scshell.cc:188: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).
				int expected = atoi(cmdBuffer[1].c_str());
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:7:1:  [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 buffer1[1024];
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:8:1:  [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 buffer2[1024];
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:26:7:  [2] (misc) fopen:
  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).
	f1 = fopen(argv[1], "r");
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:27:7:  [2] (misc) fopen:
  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).
	f2 = fopen(argv[2], "r");
data/yosys-0.9/misc/launcher.c:133: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 drive[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT];
data/yosys-0.9/misc/launcher.c:134: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 path[_MAX_PATH], c, *result;
data/yosys-0.9/misc/launcher.c:274: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 python[256];   /* python executable's filename*/
data/yosys-0.9/misc/launcher.c:276: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 script[256];   /* the script's filename */
data/yosys-0.9/misc/launcher.c:295:15:  [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).
    scriptf = open(script, O_RDONLY);
data/yosys-0.9/misc/launcher.c:309:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(python, "#!python.exe");
data/yosys-0.9/passes/cmds/add.cc:133: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).
				arg_width = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/chformal.cc:109: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).
				mode_arg = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/chformal.cc:114: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).
				mode_arg = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/cover.cc:107:6:  [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 filename_buffer[4096];
data/yosys-0.9/passes/cmds/cover.cc:112:10:  [2] (misc) fopen:
  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).
					f = fopen(filename.c_str(), open_mode);
data/yosys-0.9/passes/cmds/qwp.cc:833:25:  [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).
				config.grid = 1.0 / atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/qwp.cc:837: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).
				config.dump_file.open(args[++argidx], std::ofstream::trunc);
data/yosys-0.9/passes/cmds/scc.cc:272: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).
				maxDepth = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/scc.cc:276: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).
				expect = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/select.cc:520:12:  [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).
		levels = atoi(arg.substr(pos, endpos-pos).c_str());
data/yosys-0.9/passes/cmds/select.cc:529: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).
			rem_objects = atoi(arg.substr(pos, endpos-pos).c_str());
data/yosys-0.9/passes/cmds/select.cc:681:33:  [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 count = arg.size() > 2 ? atoi(arg.c_str() + 2) : 1;
data/yosys-0.9/passes/cmds/select.cc:826: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 width = atoi(arg_memb.substr(2).c_str());
data/yosys-0.9/passes/cmds/select.cc:833:43:  [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 min_width = min_str.empty() ? 0 : atoi(min_str.c_str());
data/yosys-0.9/passes/cmds/select.cc:834:44:  [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 max_width = max_str.empty() ? -1 : atoi(max_str.c_str());
data/yosys-0.9/passes/cmds/select.cc:1233: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).
				assert_count = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/select.cc:1237: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).
				assert_max = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/select.cc:1241: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).
				assert_min = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/select.cc:1360:9:  [2] (misc) fopen:
  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).
				f = fopen(write_file.c_str(), "w");
data/yosys-0.9/passes/cmds/setundef.cc:213: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).
				worker.next_bit_state = atoi(args[++argidx].c_str()) + 1;
data/yosys-0.9/passes/cmds/show.cc:743: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).
				colorSeed = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/cmds/show.cc:806:6:  [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).
			f.open(filename.c_str());
data/yosys-0.9/passes/cmds/show.cc:822:13:  [2] (misc) fopen:
  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).
		FILE *f = fopen(dot_file.c_str(), "w");
data/yosys-0.9/passes/cmds/stat.cc:250:4:  [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).
	f.open(liberty_file.c_str());
data/yosys-0.9/passes/cmds/tee.cc:70:15:  [2] (misc) fopen:
  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).
				FILE *f = fopen(args[++argidx].c_str(), open_mode);
data/yosys-0.9/passes/cmds/tee.cc:82: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).
				log_verbose_level += atoi(args[argidx].c_str());
data/yosys-0.9/passes/cmds/write_file.cc:69:14:  [2] (misc) fopen:
  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).
		FILE *of = fopen(output_filename.c_str(), append_mode ? "a" : "w");
data/yosys-0.9/passes/cmds/write_file.cc:71: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 * 1024];
data/yosys-0.9/passes/equiv/equiv_induct.cc:210: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).
				max_seq = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/equiv/equiv_simple.cc:328: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).
				max_seq = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/equiv/equiv_struct.cc:341: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).
				max_iter = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/fsm/fsm_export.cc:76:12:  [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).
	kiss_file.open(kiss_name, std::ios::out | std::ios::trunc);
data/yosys-0.9/passes/fsm/fsm_opt.cc:89:32:  [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).
			if (tok[0] && bit.offset == atoi(tok)) {
data/yosys-0.9/passes/fsm/fsm_recode.cc:165:23:  [2] (misc) fopen:
  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).
				fm_set_fsm_file = fopen(args[++argidx].c_str(), "w");
data/yosys-0.9/passes/fsm/fsm_recode.cc:171:15:  [2] (misc) fopen:
  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).
				encfile = fopen(args[++argidx].c_str(), "w");
data/yosys-0.9/passes/hierarchy/hierarchy.cc:203: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 idx = atoi(cell->type.str().substr(pos_idx + 1, pos_num).c_str());
data/yosys-0.9/passes/hierarchy/hierarchy.cc:204: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 num = atoi(cell->type.str().substr(pos_num + 1, pos_type).c_str());
data/yosys-0.9/passes/hierarchy/hierarchy.cc:332: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 id = atoi(conn.first.c_str()+1);
data/yosys-0.9/passes/hierarchy/hierarchy.cc:426:19:  [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 port_id = atoi(portname.substr(1).c_str());
data/yosys-0.9/passes/hierarchy/hierarchy.cc:937: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 id = atoi(conn.first.c_str()+1);
data/yosys-0.9/passes/memory/memory_bram.cc:175:12:  [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).
			value = atoi(tokens[1].c_str());
data/yosys-0.9/passes/memory/memory_bram.cc:186: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).
				value[i-1] = atoi(tokens[i].c_str());
data/yosys-0.9/passes/memory/memory_bram.cc:296:34:  [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).
				data.min_limits[tokens[1]] = atoi(tokens[2].c_str());
data/yosys-0.9/passes/memory/memory_bram.cc:301:34:  [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).
				data.max_limits[tokens[1]] = atoi(tokens[2].c_str());
data/yosys-0.9/passes/memory/memory_bram.cc:333: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);
data/yosys-0.9/passes/opt/opt_lut.cc:576: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).
					int lut_input = atoi(conn_tokens[1].c_str());
data/yosys-0.9/passes/opt/opt_lut.cc:583:13:  [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).
				limit = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/opt/pmux2shiftx.cc:243:19:  [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).
				min_density = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/opt/pmux2shiftx.cc:247:19:  [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).
				min_choices = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/opt/share.cc:1524: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).
				config.limit = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/freduce.cc:819: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).
				reduce_stop_at = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:537:8:  [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).
		sout.open(srcsfile, std::ios::out | std::ios::trunc);
data/yosys-0.9/passes/sat/mutate.cc:548:8:  [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).
		fout.open(filename, std::ios::out | std::ios::trunc);
data/yosys-0.9/passes/sat/mutate.cc:806:9:  [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).
				N = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:818: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).
				opts.seed = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:831: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).
				opts.ctrl_width = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:832: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).
				opts.ctrl_value = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:848: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).
				opts.portbit = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:852: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).
				opts.ctrlbit = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:860: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).
				opts.wirebit = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/mutate.cc:869: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).
					opts.pick_cover_prcnt = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:874: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).
					opts.weight_cover = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:879:25:  [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).
					opts.weight_pq_w = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:884:25:  [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).
					opts.weight_pq_b = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:889:25:  [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).
					opts.weight_pq_c = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:894:25:  [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).
					opts.weight_pq_s = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:899: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).
					opts.weight_pq_mw = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:904: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).
					opts.weight_pq_mb = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:909: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).
					opts.weight_pq_mc = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/mutate.cc:914: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).
					opts.weight_pq_ms = atoi(args[argidx+2].c_str());
data/yosys-0.9/passes/sat/sat.cc:663:13:  [2] (misc) fopen:
  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).
		FILE *f = fopen(vcd_file_name.c_str(), "w");
data/yosys-0.9/passes/sat/sat.cc:671: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 stime[128] = {};
data/yosys-0.9/passes/sat/sat.cc:701: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 namebuf[16];
data/yosys-0.9/passes/sat/sat.cc:766:13:  [2] (misc) fopen:
  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).
		FILE *f = fopen(json_file_name.c_str(), "w");
data/yosys-0.9/passes/sat/sat.cc:1105: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).
				timeout = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1109: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).
				loopcount = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1113: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).
				maxsteps = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1117: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).
				initsteps = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1121: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).
				stepsize = max(1, atoi(args[++argidx].c_str()));
data/yosys-0.9/passes/sat/sat.cc:1188: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).
				tempinduct_skip = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1209: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).
				prove_skip = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1213: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).
				seq_len = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1217: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).
				int timestep = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1224: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).
				int timestep = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1229: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).
				int timestep = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1235: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).
				int timestep = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1241: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).
				int timestep = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sat.cc:1511:18:  [2] (misc) fopen:
  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).
							FILE *f = fopen(cnf_file_name.c_str(), "w");
data/yosys-0.9/passes/sat/sat.cc:1615:15:  [2] (misc) fopen:
  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).
				FILE *f = fopen(cnf_file_name.c_str(), "w");
data/yosys-0.9/passes/sat/sim.cc:802:20:  [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).
				worker.vcdfile.open(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sim.cc:806: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).
				numcycles = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/sat/sim.cc:810: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).
				worker.rstlen = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/abc.cc:772:12:  [2] (misc) fopen:
  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).
	FILE *f = fopen(stringf("%s/abc.script", tempdir_name.c_str()).c_str(), "wt");
data/yosys-0.9/passes/techmap/abc.cc:809:6:  [2] (misc) fopen:
  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).
	f = fopen(buffer.c_str(), "wt");
data/yosys-0.9/passes/techmap/abc.cc:930:7:  [2] (misc) fopen:
  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).
		f = fopen(buffer.c_str(), "wt");
data/yosys-0.9/passes/techmap/abc.cc:973:8:  [2] (misc) fopen:
  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).
			f = fopen(buffer.c_str(), "wt");
data/yosys-0.9/passes/techmap/abc.cc:989: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 *abc_argv[5];
data/yosys-0.9/passes/techmap/abc.cc:1007:7:  [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).
		ifs.open(buffer);
data/yosys-0.9/passes/techmap/abc.cc:1250: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[100];
data/yosys-0.9/passes/techmap/abc.cc:1497: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 pwd [PATH_MAX];
data/yosys-0.9/passes/techmap/abc.cc:1550: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).
					lut_mode = atoi(arg.substr(0, pos).c_str());
data/yosys-0.9/passes/techmap/abc.cc:1551: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).
					lut_mode2 = atoi(arg.substr(pos+1).c_str());
data/yosys-0.9/passes/techmap/abc.cc:1553: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).
					lut_mode = atoi(arg.c_str());
data/yosys-0.9/passes/techmap/abc.cc:1570:27:  [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).
						lut_costs.push_back(atoi(parts.at(0).c_str()));
data/yosys-0.9/passes/techmap/abc.cc:1572: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).
						while (GetSize(lut_costs) < atoi(parts.at(0).c_str()))
data/yosys-0.9/passes/techmap/abc.cc:1573:28:  [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).
							lut_costs.push_back(atoi(parts.at(1).c_str()));
data/yosys-0.9/passes/techmap/dfflibmap.cc:43: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 arg[3] = { port.second, 0, 0 };
data/yosys-0.9/passes/techmap/dfflibmap.cc:596:5:  [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).
		f.open(liberty_file.c_str());
data/yosys-0.9/passes/techmap/extract.cc:479: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).
				mine_cells_min = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract.cc:480: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).
				mine_cells_max = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract.cc:484: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).
				mine_min_freq = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract.cc:488: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).
				mine_limit_mod = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract.cc:497: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).
				mine_max_fanout = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract.cc:611:8:  [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).
					f.open(filename.c_str());
data/yosys-0.9/passes/techmap/extract.cc:751:6:  [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).
			f.open(mine_outfile.c_str(), std::ofstream::trunc);
data/yosys-0.9/passes/techmap/extract_counter.cc:616: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).
				maxwidth = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract_fa.cc:579: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).
				config.maxdepth = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/extract_fa.cc:583:25:  [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).
				config.maxbreadth = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/flowmap.cc:140:12:  [2] (misc) fopen:
  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).
	FILE *f = fopen(filename.c_str(), "w");
data/yosys-0.9/passes/techmap/flowmap.cc:1528:13:  [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).
				order = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/flowmap.cc:1533: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).
				minlut = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/flowmap.cc:1548: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).
				r_alpha = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/flowmap.cc:1553: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).
				r_beta = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/flowmap.cc:1558: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).
				r_gamma = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/flowmap.cc:1564: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).
				optarea = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/libparse.cc:705:14:  [2] (misc) fopen:
  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).
			FILE *f = fopen(argv[1], "r");
data/yosys-0.9/passes/techmap/libparse.cc:711: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[1024];
data/yosys-0.9/passes/techmap/libparse.cc:754:7:  [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).
		ff->open(argv[2]);
data/yosys-0.9/passes/techmap/muxcover.cc:172: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 port_name[3] = {'\\', *path, 0};
data/yosys-0.9/passes/techmap/muxcover.cc:676: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).
					cost_mux4 = atoi(arg.substr(6).c_str());
data/yosys-0.9/passes/techmap/muxcover.cc:684: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).
					cost_mux8 = atoi(arg.substr(6).c_str());
data/yosys-0.9/passes/techmap/muxcover.cc:692:19:  [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).
					cost_mux16 = atoi(arg.substr(7).c_str());
data/yosys-0.9/passes/techmap/muxcover.cc:697: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).
				cost_dmux = atoi(arg.substr(6).c_str());
data/yosys-0.9/passes/techmap/nlutmap.cc:166:28:  [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).
					config.luts.push_back(atoi(token.c_str()));
data/yosys-0.9/passes/techmap/shregmap.cc:658:19:  [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).
				opts.minlen = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/shregmap.cc:662:19:  [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).
				opts.maxlen = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/shregmap.cc:666: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).
				opts.keep_before = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/shregmap.cc:670: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).
				opts.keep_after = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/techmap.cc:1072: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).
				max_iter = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/techmap/techmap.cc:1124:8:  [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).
					f.open(fn.c_str());
data/yosys-0.9/passes/tests/test_abcloop.cc:271: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).
				num_iter = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/tests/test_abcloop.cc:275: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).
				xorshift32_state = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/tests/test_autotb.cc:363: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).
				num_iter = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/tests/test_autotb.cc:367:12:  [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).
				seed = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/tests/test_cell.cc:733: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).
				num_iter = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/tests/test_cell.cc:737: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).
				xorshift32_state = atoi(args[++argidx].c_str());
data/yosys-0.9/passes/tests/test_cell.cc:790:15:  [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).
				vlog_file.open(args[++argidx], std::ios_base::trunc);
data/yosys-0.9/techlibs/common/synth.cc:139:11:  [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).
				lut = atoi(args[++argidx].c_str());
data/yosys-0.9/techlibs/ice40/ice40_braminit.cc:52:5:  [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).
		f.open(init_file.c_str());
data/yosys-0.9/tests/tools/cmp_tbdata.c:7:1:  [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 buffer1[8192];
data/yosys-0.9/tests/tools/cmp_tbdata.c:8:1:  [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 buffer2[8192];
data/yosys-0.9/tests/tools/cmp_tbdata.c:26:7:  [2] (misc) fopen:
  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).
	f1 = fopen(argv[1], "r");
data/yosys-0.9/tests/tools/cmp_tbdata.c:27:7:  [2] (misc) fopen:
  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).
	f2 = fopen(argv[2], "r");
data/yosys-0.9/frontends/ast/simplify.cc:2322:63:  [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).
					cell_arg->str = RTLIL::escape_id(attr.first.str().substr(strlen("\\via_celltype_defparam_")));
data/yosys-0.9/frontends/blif/blifparse.cc:32:17:  [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).
		buffer_len += strlen(buffer + buffer_len);
data/yosys-0.9/frontends/blif/blifparse.cc:298: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).
					int n = strlen(v);
data/yosys-0.9/frontends/blif/blifparse.cc:516: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).
		int input_len = strlen(input);
data/yosys-0.9/frontends/verific/verific.cc:2093: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/yosys-0.9/frontends/verific/verific.cc:2095:28:  [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.
					name = name.substr(0, equal);
data/yosys-0.9/frontends/verific/verific.cc:2151: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/yosys-0.9/frontends/verific/verific.cc:2153:28:  [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.
					name = name.substr(0, equal);
data/yosys-0.9/frontends/verilog/const2ast.cc:166: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(str) - 2;
data/yosys-0.9/frontends/verilog/verilog_frontend.cc:404: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/yosys-0.9/frontends/verilog/verilog_frontend.cc:406:28:  [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.
					name = name.substr(0, equal);
data/yosys-0.9/frontends/verilog/verilog_frontend.cc:415: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/yosys-0.9/frontends/verilog/verilog_frontend.cc:565: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/yosys-0.9/frontends/verilog/verilog_frontend.cc:567:28:  [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.
					name = name.substr(0, equal);
data/yosys-0.9/frontends/verilog/verilog_frontend.cc:576: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/yosys-0.9/kernel/log.cc:135:27:  [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 (format[0] && format[strlen(format)-1] == '\n')
data/yosys-0.9/kernel/log.cc:658:35:  [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 (!it.second.first.compare(0, strlen(YOSYS_SRC "/"), YOSYS_SRC "/"))
data/yosys-0.9/kernel/log.cc:659: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).
			it.second.first = it.second.first.substr(strlen(YOSYS_SRC "/"));
data/yosys-0.9/kernel/rtlil.h:273:43:  [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 (len == std::string::npos || len >= strlen(c_str() + pos))
data/yosys-0.9/kernel/yosys.cc:1063:9:  [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).
		len = strlen(text);
data/yosys-0.9/kernel/yosys.cc:1084: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(text);
data/yosys-0.9/libs/bigint/BigInteger.cc:144: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.
		return equal; // Two zeros are equal
data/yosys-0.9/libs/bigint/BigInteger.cc:184:8:  [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.
		case equal:
data/yosys-0.9/libs/bigint/BigInteger.cc:223:8:  [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.
		case equal:
data/yosys-0.9/libs/bigint/BigUnsigned.cc:88: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.
		return equal;
data/yosys-0.9/libs/minisat/Options.h:371: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).
        for (uint32_t i = 0; i < 32 - strlen(name)*2; i++)
data/yosys-0.9/libs/minisat/System.cc:68:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while (!feof(in) && fgetc(in) != '\n')
data/yosys-0.9/libs/sha1/sha1.cpp:52:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(is, rest_of_buffer, BLOCK_BYTES - buffer.size());
data/yosys-0.9/libs/sha1/sha1.cpp:60:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(is, buffer, BLOCK_BYTES);
data/yosys-0.9/libs/sha1/sha1.cpp:259:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void SHA1::read(std::istream &is, std::string &s, size_t max)
data/yosys-0.9/libs/sha1/sha1.cpp:263:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is.read(sbuf, max);
data/yosys-0.9/libs/sha1/sha1.h:49:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static void read(std::istream &is, std::string &s, size_t max);
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:40:27:  [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 (*buffer1 && buffer1[strlen(buffer1)-1] == '\n')
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:41:12:  [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).
			buffer1[strlen(buffer1)-1] = 0;
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:43:27:  [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 (*buffer2 && buffer2[strlen(buffer2)-1] == '\n')
data/yosys-0.9/manual/CHAPTER_StateOfTheArt/cmp_tbdata.c:44:12:  [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).
			buffer2[strlen(buffer2)-1] = 0;
data/yosys-0.9/misc/launcher.c:75:17:  [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 i, ln = strlen(data), nb;
data/yosys-0.9/misc/launcher.c:124:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(result, exename, MAX_PATH);
data/yosys-0.9/misc/launcher.c:149: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).
    result = dir + strlen(dir) -1;
data/yosys-0.9/misc/launcher.c:161:28:  [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).
    char **result = calloc(strlen(cmdline), sizeof(char *));
data/yosys-0.9/misc/launcher.c:257:9:  [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).
    len=strlen(executable)+2;
data/yosys-0.9/misc/launcher.c:259: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).
        len+=strlen(args[counter])+1;
data/yosys-0.9/misc/launcher.c:264:9:  [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).
    len=strlen(executable);
data/yosys-0.9/misc/launcher.c:267: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).
        len+=strlen(args[counter])+1;
data/yosys-0.9/misc/launcher.c:287: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).
    end = script + strlen(script);
data/yosys-0.9/misc/launcher.c:299:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    end = python + read(scriptf, python, sizeof(python));
data/yosys-0.9/passes/techmap/abc.cc:502: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).
					log("                               %*s  %s -> %s\n", int(strlen(log_signal(RTLIL::SigSpec(wire)))), "",
data/yosys-0.9/passes/techmap/techmap.cc:744:40:  [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).
								cmd_string = cmd_string.substr(strlen("CONSTMAP; "));
data/yosys-0.9/passes/techmap/techmap.cc:813:40:  [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).
								cmd_string = cmd_string.substr(strlen("RECURSION; "));
data/yosys-0.9/tests/tools/cmp_tbdata.c:40:27:  [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 (*buffer1 && buffer1[strlen(buffer1)-1] == '\n')
data/yosys-0.9/tests/tools/cmp_tbdata.c:41:12:  [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).
			buffer1[strlen(buffer1)-1] = 0;
data/yosys-0.9/tests/tools/cmp_tbdata.c:43:27:  [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 (*buffer2 && buffer2[strlen(buffer2)-1] == '\n')
data/yosys-0.9/tests/tools/cmp_tbdata.c:44:12:  [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).
			buffer2[strlen(buffer2)-1] = 0;

ANALYSIS SUMMARY:

Hits = 363
Lines analyzed = 117536 in approximately 3.23 seconds (36333 lines/second)
Physical Source Lines of Code (SLOC) = 92730
Hits@level = [0] 736 [1]  53 [2] 258 [3]  16 [4]  35 [5]   1
Hits@level+ = [0+] 1099 [1+] 363 [2+] 310 [3+]  52 [4+]  36 [5+]   1
Hits/KSLOC@level+ = [0+] 11.8516 [1+] 3.91459 [2+] 3.34304 [3+] 0.560768 [4+] 0.388224 [5+] 0.010784
Dot directories skipped = 3 (--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.