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/gringo-5.4.0/app/clingo/main.cc
Examining data/gringo-5.4.0/app/gringo/main.cc
Examining data/gringo-5.4.0/app/luaclingo/main.cc
Examining data/gringo-5.4.0/app/pyclingo/main.cc
Examining data/gringo-5.4.0/app/reify/main.cc
Examining data/gringo-5.4.0/app/web/main.cc
Examining data/gringo-5.4.0/clasp/app/clasp_app.cpp
Examining data/gringo-5.4.0/clasp/app/clasp_app.h
Examining data/gringo-5.4.0/clasp/app/main.cpp
Examining data/gringo-5.4.0/clasp/clasp/asp_preprocessor.h
Examining data/gringo-5.4.0/clasp/clasp/cb_enumerator.h
Examining data/gringo-5.4.0/clasp/clasp/clasp_facade.h
Examining data/gringo-5.4.0/clasp/clasp/claspfwd.h
Examining data/gringo-5.4.0/clasp/clasp/clause.h
Examining data/gringo-5.4.0/clasp/clasp/cli/clasp_options.h
Examining data/gringo-5.4.0/clasp/clasp/cli/clasp_output.h
Examining data/gringo-5.4.0/clasp/clasp/clingo.h
Examining data/gringo-5.4.0/clasp/clasp/constraint.h
Examining data/gringo-5.4.0/clasp/clasp/dependency_graph.h
Examining data/gringo-5.4.0/clasp/clasp/enumerator.h
Examining data/gringo-5.4.0/clasp/clasp/heuristics.h
Examining data/gringo-5.4.0/clasp/clasp/literal.h
Examining data/gringo-5.4.0/clasp/clasp/logic_program.h
Examining data/gringo-5.4.0/clasp/clasp/logic_program_types.h
Examining data/gringo-5.4.0/clasp/clasp/lookahead.h
Examining data/gringo-5.4.0/clasp/clasp/minimize_constraint.h
Examining data/gringo-5.4.0/clasp/clasp/model_enumerators.h
Examining data/gringo-5.4.0/clasp/clasp/mt/mutex.h
Examining data/gringo-5.4.0/clasp/clasp/mt/parallel_solve.h
Examining data/gringo-5.4.0/clasp/clasp/mt/thread.h
Examining data/gringo-5.4.0/clasp/clasp/parser.h
Examining data/gringo-5.4.0/clasp/clasp/pod_vector.h
Examining data/gringo-5.4.0/clasp/clasp/program_builder.h
Examining data/gringo-5.4.0/clasp/clasp/satelite.h
Examining data/gringo-5.4.0/clasp/clasp/shared_context.h
Examining data/gringo-5.4.0/clasp/clasp/solve_algorithms.h
Examining data/gringo-5.4.0/clasp/clasp/solver.h
Examining data/gringo-5.4.0/clasp/clasp/solver_strategies.h
Examining data/gringo-5.4.0/clasp/clasp/solver_types.h
Examining data/gringo-5.4.0/clasp/clasp/statistics.h
Examining data/gringo-5.4.0/clasp/clasp/unfounded_check.h
Examining data/gringo-5.4.0/clasp/clasp/util/hash.h
Examining data/gringo-5.4.0/clasp/clasp/util/indexed_priority_queue.h
Examining data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h
Examining data/gringo-5.4.0/clasp/clasp/util/misc_types.h
Examining data/gringo-5.4.0/clasp/clasp/util/multi_queue.h
Examining data/gringo-5.4.0/clasp/clasp/util/pod_vector.h
Examining data/gringo-5.4.0/clasp/clasp/util/timer.h
Examining data/gringo-5.4.0/clasp/clasp/util/type_manip.h
Examining data/gringo-5.4.0/clasp/clasp/weight_constraint.h
Examining data/gringo-5.4.0/clasp/examples/example.h
Examining data/gringo-5.4.0/clasp/examples/example1.cpp
Examining data/gringo-5.4.0/clasp/examples/example2.cpp
Examining data/gringo-5.4.0/clasp/examples/example3.cpp
Examining data/gringo-5.4.0/clasp/examples/example4.cpp
Examining data/gringo-5.4.0/clasp/examples/main.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/app/lpconvert.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/application.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/aspif.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/aspif_text.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/basic_types.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/clingo.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/convert.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/match_basic_types.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/platform.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/detail/notifier.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/detail/refcountable.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/detail/value_store.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/errors.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/mapped_value.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/program_options.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/typed_value.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/value.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/program_opts/value_store.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/rule_utils.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/smodels.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/string_convert.h
Examining data/gringo-5.4.0/clasp/libpotassco/potassco/theory_data.h
Examining data/gringo-5.4.0/clasp/libpotassco/src/application.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/aspif.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/aspif_text.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/clingo.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/convert.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/match_basic_types.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/rule_utils.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/smodels.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/theory_data.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/src/value_store.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/main.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_application.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_common.h
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_options.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_smodels.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp
Examining data/gringo-5.4.0/clasp/libpotassco/tests/test_value.cpp
Examining data/gringo-5.4.0/clasp/src/asp_preprocessor.cpp
Examining data/gringo-5.4.0/clasp/src/cb_enumerator.cpp
Examining data/gringo-5.4.0/clasp/src/clasp_facade.cpp
Examining data/gringo-5.4.0/clasp/src/clasp_options.cpp
Examining data/gringo-5.4.0/clasp/src/clasp_output.cpp
Examining data/gringo-5.4.0/clasp/src/clause.cpp
Examining data/gringo-5.4.0/clasp/src/clingo.cpp
Examining data/gringo-5.4.0/clasp/src/constraint.cpp
Examining data/gringo-5.4.0/clasp/src/dependency_graph.cpp
Examining data/gringo-5.4.0/clasp/src/enumerator.cpp
Examining data/gringo-5.4.0/clasp/src/heuristics.cpp
Examining data/gringo-5.4.0/clasp/src/logic_program.cpp
Examining data/gringo-5.4.0/clasp/src/logic_program_types.cpp
Examining data/gringo-5.4.0/clasp/src/lookahead.cpp
Examining data/gringo-5.4.0/clasp/src/minimize_constraint.cpp
Examining data/gringo-5.4.0/clasp/src/model_enumerators.cpp
Examining data/gringo-5.4.0/clasp/src/parallel_solve.cpp
Examining data/gringo-5.4.0/clasp/src/parser.cpp
Examining data/gringo-5.4.0/clasp/src/program_builder.cpp
Examining data/gringo-5.4.0/clasp/src/satelite.cpp
Examining data/gringo-5.4.0/clasp/src/shared_context.cpp
Examining data/gringo-5.4.0/clasp/src/solve_algorithms.cpp
Examining data/gringo-5.4.0/clasp/src/solver.cpp
Examining data/gringo-5.4.0/clasp/src/solver_strategies.cpp
Examining data/gringo-5.4.0/clasp/src/solver_types.cpp
Examining data/gringo-5.4.0/clasp/src/statistics.cpp
Examining data/gringo-5.4.0/clasp/src/timer.cpp
Examining data/gringo-5.4.0/clasp/src/unfounded_check.cpp
Examining data/gringo-5.4.0/clasp/src/weight_constraint.cpp
Examining data/gringo-5.4.0/clasp/tests/catch.hpp
Examining data/gringo-5.4.0/clasp/tests/clause_creator_test.cpp
Examining data/gringo-5.4.0/clasp/tests/clause_test.cpp
Examining data/gringo-5.4.0/clasp/tests/cli_test.cpp
Examining data/gringo-5.4.0/clasp/tests/decision_heuristic_test.cpp
Examining data/gringo-5.4.0/clasp/tests/dependency_graph_test.cpp
Examining data/gringo-5.4.0/clasp/tests/dlp_builder_test.cpp
Examining data/gringo-5.4.0/clasp/tests/enumerator_test.cpp
Examining data/gringo-5.4.0/clasp/tests/facade_test.cpp
Examining data/gringo-5.4.0/clasp/tests/literal_test.cpp
Examining data/gringo-5.4.0/clasp/tests/lpcompare.h
Examining data/gringo-5.4.0/clasp/tests/minimize_test.cpp
Examining data/gringo-5.4.0/clasp/tests/parser_test.cpp
Examining data/gringo-5.4.0/clasp/tests/program_builder_test.cpp
Examining data/gringo-5.4.0/clasp/tests/rule_test.cpp
Examining data/gringo-5.4.0/clasp/tests/satelite_test.cpp
Examining data/gringo-5.4.0/clasp/tests/solver_test.cpp
Examining data/gringo-5.4.0/clasp/tests/test_main.cpp
Examining data/gringo-5.4.0/clasp/tests/unfounded_check_test.cpp
Examining data/gringo-5.4.0/clasp/tests/weight_constraint_test.cpp
Examining data/gringo-5.4.0/examples/c/application.c
Examining data/gringo-5.4.0/examples/c/ast.c
Examining data/gringo-5.4.0/examples/c/backend.c
Examining data/gringo-5.4.0/examples/c/configuration.c
Examining data/gringo-5.4.0/examples/c/control.c
Examining data/gringo-5.4.0/examples/c/model.c
Examining data/gringo-5.4.0/examples/c/propagator.c
Examining data/gringo-5.4.0/examples/c/solve-async.c
Examining data/gringo-5.4.0/examples/c/statistics.c
Examining data/gringo-5.4.0/examples/c/symbol.c
Examining data/gringo-5.4.0/examples/c/symbolic-atoms.c
Examining data/gringo-5.4.0/examples/c/theory-atoms.c
Examining data/gringo-5.4.0/examples/c/version.c
Examining data/gringo-5.4.0/examples/cc/heuristic.cc
Examining data/gringo-5.4.0/examples/cc/inject-terms.cc
Examining data/gringo-5.4.0/examples/cc/solve-iteratively.cc
Examining data/gringo-5.4.0/libclingo/clingo.h
Examining data/gringo-5.4.0/libclingo/clingo/script.h
Examining data/gringo-5.4.0/libclingo/src/ast.cc
Examining data/gringo-5.4.0/libclingo/src/clingo_app.cc
Examining data/gringo-5.4.0/libclingo/src/clingocontrol.cc
Examining data/gringo-5.4.0/libclingo/src/control.cc
Examining data/gringo-5.4.0/libclingo/src/gringo_app.cc
Examining data/gringo-5.4.0/libclingo/src/incmode.cc
Examining data/gringo-5.4.0/libclingo/src/scripts.cc
Examining data/gringo-5.4.0/libclingo/tests/ast.cc
Examining data/gringo-5.4.0/libclingo/tests/catch.hpp
Examining data/gringo-5.4.0/libclingo/tests/clingo.cc
Examining data/gringo-5.4.0/libclingo/tests/main.cc
Examining data/gringo-5.4.0/libclingo/tests/propagator.cc
Examining data/gringo-5.4.0/libclingo/tests/symbol.cc
Examining data/gringo-5.4.0/libclingo/tests/variant.cc
Examining data/gringo-5.4.0/libgringo/gen/src/input/groundtermgrammar/grammar.cc
Examining data/gringo-5.4.0/libgringo/gen/src/input/nongroundgrammar/grammar.cc
Examining data/gringo-5.4.0/libgringo/src/backend.cc
Examining data/gringo-5.4.0/libgringo/src/ground/instantiation.cc
Examining data/gringo-5.4.0/libgringo/src/ground/literals.cc
Examining data/gringo-5.4.0/libgringo/src/ground/program.cc
Examining data/gringo-5.4.0/libgringo/src/ground/statements.cc
Examining data/gringo-5.4.0/libgringo/src/input/aggregate.cc
Examining data/gringo-5.4.0/libgringo/src/input/aggregates.cc
Examining data/gringo-5.4.0/libgringo/src/input/groundtermparser.cc
Examining data/gringo-5.4.0/libgringo/src/input/literal.cc
Examining data/gringo-5.4.0/libgringo/src/input/literals.cc
Examining data/gringo-5.4.0/libgringo/src/input/nongroundparser.cc
Examining data/gringo-5.4.0/libgringo/src/input/program.cc
Examining data/gringo-5.4.0/libgringo/src/input/programbuilder.cc
Examining data/gringo-5.4.0/libgringo/src/input/statement.cc
Examining data/gringo-5.4.0/libgringo/src/input/theory.cc
Examining data/gringo-5.4.0/libgringo/src/output/aggregates.cc
Examining data/gringo-5.4.0/libgringo/src/output/literal.cc
Examining data/gringo-5.4.0/libgringo/src/output/literals.cc
Examining data/gringo-5.4.0/libgringo/src/output/output.cc
Examining data/gringo-5.4.0/libgringo/src/output/statement.cc
Examining data/gringo-5.4.0/libgringo/src/output/statements.cc
Examining data/gringo-5.4.0/libgringo/src/output/theory.cc
Examining data/gringo-5.4.0/libgringo/src/primes.cc
Examining data/gringo-5.4.0/libgringo/src/symbol.cc
Examining data/gringo-5.4.0/libgringo/src/term.cc
Examining data/gringo-5.4.0/libgringo/src/terms.cc
Examining data/gringo-5.4.0/libgringo/tests/catch.hpp
Examining data/gringo-5.4.0/libgringo/tests/graph.cc
Examining data/gringo-5.4.0/libgringo/tests/ground/dependency.cc
Examining data/gringo-5.4.0/libgringo/tests/ground/instantiation.cc
Examining data/gringo-5.4.0/libgringo/tests/ground/literal.cc
Examining data/gringo-5.4.0/libgringo/tests/ground/program.cc
Examining data/gringo-5.4.0/libgringo/tests/ground/theory.cc
Examining data/gringo-5.4.0/libgringo/tests/input/aggregate.cc
Examining data/gringo-5.4.0/libgringo/tests/input/literal.cc
Examining data/gringo-5.4.0/libgringo/tests/input/nongroundgrammar.cc
Examining data/gringo-5.4.0/libgringo/tests/input/nongroundlexer.cc
Examining data/gringo-5.4.0/libgringo/tests/input/parse_term.cc
Examining data/gringo-5.4.0/libgringo/tests/input/program.cc
Examining data/gringo-5.4.0/libgringo/tests/input/programbuilder.cc
Examining data/gringo-5.4.0/libgringo/tests/intervals.cc
Examining data/gringo-5.4.0/libgringo/tests/main.cc
Examining data/gringo-5.4.0/libgringo/tests/output/aspcomp13.cc
Examining data/gringo-5.4.0/libgringo/tests/output/incremental.cc
Examining data/gringo-5.4.0/libgringo/tests/output/lparse.cc
Examining data/gringo-5.4.0/libgringo/tests/output/theory.cc
Examining data/gringo-5.4.0/libgringo/tests/output/warnings.cc
Examining data/gringo-5.4.0/libgringo/tests/python.cc
Examining data/gringo-5.4.0/libgringo/tests/safetycheck.cc
Examining data/gringo-5.4.0/libgringo/tests/symbol.cc
Examining data/gringo-5.4.0/libgringo/tests/term.cc
Examining data/gringo-5.4.0/libgringo/tests/unique_vec.cc
Examining data/gringo-5.4.0/libgringo/tests/utility.cc
Examining data/gringo-5.4.0/libluaclingo/luaclingo.cc
Examining data/gringo-5.4.0/libluaclingo/luaclingo.h
Examining data/gringo-5.4.0/libpyclingo/pyclingo.h
Examining data/gringo-5.4.0/libpyclingo/pyclingo.cc
Examining data/gringo-5.4.0/libreify/src/program.cc
Examining data/gringo-5.4.0/libreify/tests/catch.hpp
Examining data/gringo-5.4.0/libreify/tests/main.cc
Examining data/gringo-5.4.0/libreify/tests/program.cc

FINAL RESULTS:

data/gringo-5.4.0/clasp/clasp/shared_context.h:94:107:  [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.
	void dispatch(const Event& ev)               { if (ev.verb <= verbosity(static_cast<Event::Subsystem>(ev.system))) { onEvent(ev); } }
data/gringo-5.4.0/clasp/clasp/util/misc_types.h:417:68:  [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.
	explicit Event(Subsystem sys, uint32 evId, Verbosity verbosity) : system(sys), verb(verbosity), op(0), id(evId) {}
data/gringo-5.4.0/clasp/clasp/util/misc_types.h:418:9:  [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.
	uint32 system : 2; //!< One of Event::Subsystem - subsystem that produced the event.
data/gringo-5.4.0/clasp/libpotassco/potassco/string_convert.h:308:5:  [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.
int vsnprintf(char* s, size_t n, const char* format, va_list arg);
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:60:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	size_t n = sprintf(buffer, "  --%s%s", np, o.name().c_str());
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:62:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		n += sprintf(buffer+n, "[=%s%s]", arg, ap);
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:68:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		n += sprintf(buffer+n, "%c%s%s", (!o.alias()?'=':' '), arg, ap);
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:70:5:  [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.
int vsnprintf(char* s, size_t n, const char* format, va_list arg) {
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:71:14:  [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.
	return std::vsnprintf(s, n, format, arg);
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:74:5:  [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.
int vsnprintf(char* s, size_t n, const char* format, va_list arg) {
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:78:28:  [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.
	if (n == 0 || (res = std::vsnprintf(s, n, format, arg)) < 0 || size_t(res) >= n) {
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:406:11:  [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.
		int n = vsnprintf(buf.pos(), buf.free(), fmt, args);
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:416:38:  [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.
			x = static_cast<size_t>(Potassco::vsnprintf(buf.pos(), buf.free() + 1, fmt, args));
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:458:3:  [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.
		vsnprintf(pos, sz, fmt, args);
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:198:23:  [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.
				int r = Potassco::vsnprintf(s, n, fmt, args);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:550:2:  [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("%s%-*s\"%s\": %" PRIu64, open_, indent(), " ", k, v);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:623: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("%s%" PRId64, sep, *it);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:687:38:  [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 printKeyValue(k, fmt, value) printf("%s%-*s: " fmt, format[cat_comment], width_, (k), (value))
data/gringo-5.4.0/clasp/src/clasp_output.cpp:775:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stdout, fmt, args);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:866:16:  [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.
			setState(ev.system, ev.verb, log->msg);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:940:24:  [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.
	if (s.first){ accu += printf(format[cat_atom_name], s.first); }
data/gringo-5.4.0/clasp/src/clasp_output.cpp:941:24:  [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.
	else        { accu += printf(format[cat_atom_var] + !s.second.sign(), static_cast<int>(s.second.var())); }
data/gringo-5.4.0/clasp/src/clasp_output.cpp:1008:4:  [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("%" PRId64, upper[i]);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:1019: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("%" PRId64, costs[0]);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:1022:4:  [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("%" PRId64, costs[i]);
data/gringo-5.4.0/clasp/src/statistics.cpp:241:36:  [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).
		return *strings_.insert(it, std::strcpy(new char[std::strlen(s) + 1], s));
data/gringo-5.4.0/clasp/src/timer.cpp:48: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.
	} user, system;
data/gringo-5.4.0/clasp/src/timer.cpp:49:79:  [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.
	GetProcessTimes(GetCurrentProcess(), &ignoreStart, &ignoreExit, &user.time, &system.time);
data/gringo-5.4.0/clasp/src/timer.cpp:50:24:  [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 (user.asUint + system.asUint) / double(TICKS_PER_SEC);
data/gringo-5.4.0/clasp/src/timer.cpp:58: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.
	} user, system;
data/gringo-5.4.0/clasp/src/timer.cpp:59:77:  [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.
	GetThreadTimes(GetCurrentThread(), &ignoreStart, &ignoreExit, &user.time, &system.time);
data/gringo-5.4.0/clasp/src/timer.cpp:60:24:  [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 (user.asUint + system.asUint) / double(TICKS_PER_SEC);
data/gringo-5.4.0/examples/c/application.c:59:3:  [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(*program, value);
data/gringo-5.4.0/libclingo/src/control.cc:884:14:  [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).
        std::strcpy(ret, value.c_str());
data/gringo-5.4.0/libclingo/src/control.cc:1542:10:  [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).
    std::strcpy(ret, str);
data/gringo-5.4.0/libgringo/src/symbol.cc:150:14:  [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).
        std::strcpy(buf.get(), &str);
data/gringo-5.4.0/libpyclingo/pyclingo.cc:8294:35:  [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.
        This is the last point to access theory atoms.  Once the search has
data/gringo-5.4.0/clasp/clasp/util/misc_types.h:106:7:  [3] (random) srand:
  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.
	void srand(uint32 seed) { seed_ = seed; }
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:8543:18:  [3] (random) srand:
  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.
            std::srand( config.rngSeed() );
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:234:8:  [3] (random) srand:
  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.
		std::srand(0);
data/gringo-5.4.0/clasp/src/heuristics.cpp:141:8:  [3] (random) srand:
  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.
		rng_.srand(s.rng.seed());
data/gringo-5.4.0/clasp/src/solver.cpp:229:8:  [3] (random) srand:
  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.
			rng.srand(params.seed);
data/gringo-5.4.0/clasp/src/solver.cpp:233:8:  [3] (random) srand:
  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.
			rng.srand(x.seed());
data/gringo-5.4.0/clasp/tests/catch.hpp:8653:18:  [3] (random) srand:
  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.
            std::srand( config.rngSeed() );
data/gringo-5.4.0/examples/c/statistics.c:83:19:  [3] (random) random:
  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.
        random = (random << 3) ^ (random ^ ((random & 0xf800) >> 13)) ^ i;
data/gringo-5.4.0/examples/c/statistics.c:83:35:  [3] (random) random:
  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.
        random = (random << 3) ^ (random ^ ((random & 0xf800) >> 13)) ^ i;
data/gringo-5.4.0/examples/c/statistics.c:83:46:  [3] (random) random:
  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.
        random = (random << 3) ^ (random ^ ((random & 0xf800) >> 13)) ^ i;
data/gringo-5.4.0/examples/c/statistics.c:85:56:  [3] (random) random:
  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 (!clingo_statistics_value_set(stats, value, random)) { return false; }
data/gringo-5.4.0/examples/c/statistics.c:86:16:  [3] (random) random:
  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.
        sum += random;
data/gringo-5.4.0/libclingo/tests/catch.hpp:4092:1:  [3] (random) random:
  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.
random(T a, T b) {
data/gringo-5.4.0/libclingo/tests/catch.hpp:4101:1:  [3] (random) random:
  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.
random(T a, T b) {
data/gringo-5.4.0/libclingo/tests/catch.hpp:9934:18:  [3] (random) srand:
  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.
            std::srand( config.rngSeed() );
data/gringo-5.4.0/libclingo/tests/clingo.cc:97:44:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
                        Temp() : file(std::tmpnam(temp)) { }
data/gringo-5.4.0/libgringo/src/input/nongroundparser.cc:165:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (char *env_paths = getenv("CLINGOPATH")) {
data/gringo-5.4.0/libgringo/tests/catch.hpp:4092:1:  [3] (random) random:
  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.
random(T a, T b) {
data/gringo-5.4.0/libgringo/tests/catch.hpp:4101:1:  [3] (random) random:
  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.
random(T a, T b) {
data/gringo-5.4.0/libgringo/tests/catch.hpp:9934:18:  [3] (random) srand:
  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.
            std::srand( config.rngSeed() );
data/gringo-5.4.0/libreify/tests/catch.hpp:4092:1:  [3] (random) random:
  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.
random(T a, T b) {
data/gringo-5.4.0/libreify/tests/catch.hpp:4101:1:  [3] (random) random:
  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.
random(T a, T b) {
data/gringo-5.4.0/libreify/tests/catch.hpp:9934:18:  [3] (random) srand:
  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.
            std::srand( config.rngSeed() );
data/gringo-5.4.0/clasp/app/clasp_app.cpp:395: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).
			file.open(claspAppOpts_.input[0].c_str());
data/gringo-5.4.0/clasp/app/clasp_app.cpp:453:31:  [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).
				if (!isStdIn(fn)) { file_.open(fn.c_str()); }
data/gringo-5.4.0/clasp/app/clasp_app.cpp:534:33:  [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).
	: str_(isStdOut(to) ? stdout : fopen(to.c_str(), "w"))
data/gringo-5.4.0/clasp/app/clasp_app.cpp:584: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/gringo-5.4.0/clasp/app/clasp_app.cpp:640:55:  [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).
WriteCnf::WriteCnf(const std::string& outFile) : str_(fopen(outFile.c_str(), "w")) {
data/gringo-5.4.0/clasp/clasp/cli/clasp_output.h:262: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          ifs_[2];  // field separator
data/gringo-5.4.0/clasp/clasp/minimize_constraint.h:523:82:  [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).
	uint32   allocCore(WeightConstraint* con, weight_t bound, weight_t weight, bool open);
data/gringo-5.4.0/clasp/clasp/mt/parallel_solve.h:339: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            pad[64 - (sizeof(uint64)*2)];
data/gringo-5.4.0/clasp/clasp/satelite.h:69:43:  [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).
	void  doExtendModel(ValueVec& m, LitVec& open);
data/gringo-5.4.0/clasp/clasp/shared_context.h:185:40:  [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).
	void extendModel(ValueVec& m, LitVec& open);
data/gringo-5.4.0/clasp/clasp/shared_context.h:197:51:  [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).
	virtual void  doExtendModel(ValueVec& m, LitVec& open) = 0;
data/gringo-5.4.0/clasp/clasp/solver_types.h:479:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char mem[32 - sizeof(Chunk*)];
data/gringo-5.4.0/clasp/clasp/solver_types.h:484:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char pad[32-sizeof(Block*)];
data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h:183:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(temp, begin(), left_size()*sizeof(L));
data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h:186:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(temp+(new_cap-r), right(), right_size() * sizeof(R));
data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h:285:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			std::memcpy(e,   this->begin(), this->left_size() * sizeof(left_type));
data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h:286:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			std::memcpy(e+r, this->right(), this->right_size()* sizeof(right_type));
data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h:333:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(this->begin(), other.begin(), other.left_size()*sizeof(left_type));
data/gringo-5.4.0/clasp/clasp/util/left_right_sequence.h:334:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(this->right(), const_cast<left_right_sequence&>(other).right(), other.right_size()*sizeof(right_type));
data/gringo-5.4.0/clasp/clasp/util/multi_queue.h:254: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        pad_[64 - sizeof(Node*)];
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:96:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			std::memcpy(out, first_, n*sizeof(T));
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:184:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(ebo_.buf, other.begin(), other.size()*sizeof(T));
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:354:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			std::memcpy(temp, ebo_.buf, size()*sizeof(T));
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:454:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(temp, ebo_.buf, size()*sizeof(T));
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:502:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			std::memcpy(temp, begin(), prefix*sizeof(T));
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:506:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			std::memcpy(temp+prefix+n, pos, (end()-pos)*sizeof(T));
data/gringo-5.4.0/clasp/clasp/weight_constraint.h:54: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).
	bool open()       const { return bound > 0 && bound <= reach;}
data/gringo-5.4.0/clasp/libpotassco/app/lpconvert.cpp:90: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).
		iFile.open(input_.c_str());
data/gringo-5.4.0/clasp/libpotassco/app/lpconvert.cpp:95: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).
		oFile.open(output_.c_str());
data/gringo-5.4.0/clasp/libpotassco/potassco/string_convert.h:387: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         sbo_[64];
data/gringo-5.4.0/clasp/libpotassco/src/match_basic_types.cpp:103:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(buf_, buf_ + rpos_, bLen);
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:65:8:  [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.
		n += sprintf(buffer+n, ",-%c", o.alias());
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:70:21:  [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.
	if (n < maxW) n += sprintf(buffer+n, "%-*.*s", int(maxW-n), int(maxW-n), " ");
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp: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 sName[2] = {'-', opt->alias()};
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:632: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 optn[2];
data/gringo-5.4.0/clasp/libpotassco/src/rule_utils.cpp:85:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(mem_.begin(), other.mem_.begin(), other.rule_()->top);
data/gringo-5.4.0/clasp/libpotassco/src/rule_utils.cpp:170:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(bound_(), &bound, sizeof(Weight_t));
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:380:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(buf.pos(), str, n = std::min(n, buf.free()));
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:401: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 small[64];
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:424: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 temp[22];
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:443: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 msg[1024];
data/gringo-5.4.0/clasp/libpotassco/src/theory_data.cpp:48:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(f->args, begin(args), f->size * sizeof(Id_t));
data/gringo-5.4.0/clasp/libpotassco/src/theory_data.cpp:105:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(term_, Potassco::begin(terms), nTerms_ * sizeof(Id_t));
data/gringo-5.4.0/clasp/libpotassco/src/theory_data.cpp:131:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(term_, Potassco::begin(args), nTerms_ * sizeof(Id_t));
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:1581:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    struct TrueType { char sizer[1]; };
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:1582:24:  [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.
    struct FalseType { char sizer[2]; };
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:3137: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.
        char storage[sizeof(T)];
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:6086:14:  [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).
        void open() {
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:6180:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                open();
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:6226:26:  [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).
                tracker->open();
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:6415:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char altStackMem[SIGSTKSZ];
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:7482: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.
        char data[bufferSize];
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:7519: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).
        m_ofs.open( filename.c_str() );
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:8739:21:  [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 asChar[sizeof (int)];
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:9377:13:  [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[maxDoubleSize];
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:9384:13:  [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(buffer, "%.3f", duration);
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:9610:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:10204:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:193:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[5], buf2[6];
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:293:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[10];
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:310:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[10];
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:324:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[5];
data/gringo-5.4.0/clasp/libpotassco/tests/test_string_convert.cpp:333:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[10];
data/gringo-5.4.0/clasp/src/cb_enumerator.cpp:96: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).
		bool   open(Literal p) const { return (value_[p.var()] & Model::estMask(p)) != 0; }
data/gringo-5.4.0/clasp/src/cb_enumerator.cpp:151:21:  [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).
		if      (!state_->open(*it))        { continue; }
data/gringo-5.4.0/clasp/src/cb_enumerator.cpp:167:21:  [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).
		if      (!state_->open(*it)) { continue; }
data/gringo-5.4.0/clasp/src/cb_enumerator.cpp:179:71:  [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).
		for (; i != end && s.value(open_[i].var()) == value_free && state_->open(open_[i]); ++i) { ; }
data/gringo-5.4.0/clasp/src/cb_enumerator.cpp:193:29:  [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).
	if (!hasQuery() && state_->open(query_)) {
data/gringo-5.4.0/clasp/src/cb_enumerator.cpp:214:43:  [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).
	bool newQ = query_.flagged() || !state_->open(query_);
data/gringo-5.4.0/clasp/src/clasp_options.cpp:896:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(buffer, temp.c_str(), n * sizeof(char));
data/gringo-5.4.0/clasp/src/clasp_output.cpp:531: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 buf[BUF_SIZE];
data/gringo-5.4.0/clasp/src/clasp_output.cpp:889: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 line[128];
data/gringo-5.4.0/clasp/src/clasp_output.cpp:897: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 timeBuffer[30];
data/gringo-5.4.0/clasp/src/clause.cpp:68:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(lits_, a_lits, size*sizeof(Literal));
data/gringo-5.4.0/clasp/src/clause.cpp:404:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(head_, rep.lits, rep.size*sizeof(Literal));
data/gringo-5.4.0/clasp/src/clause.cpp:419:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(head_, rep.lits, std::min(rep.size, (uint32)ClauseHead::HEAD_LITS)*sizeof(Literal));
data/gringo-5.4.0/clasp/src/clause.cpp:430:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	if      (!isSmall())      { std::memcpy(head_, other.head_, oSize*sizeof(Literal)); }
data/gringo-5.4.0/clasp/src/clause.cpp:431:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	else if (other.isSmall()) { std::memcpy(&local_, &other.local_, (ClauseHead::MAX_SHORT_LEN+1)*sizeof(Literal)); }
data/gringo-5.4.0/clasp/src/clause.cpp:433:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(head_, other.head_, ClauseHead::HEAD_LITS*sizeof(Literal));
data/gringo-5.4.0/clasp/src/clause.cpp:434:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(&local_, other.head_+ClauseHead::HEAD_LITS, 2*sizeof(Literal));
data/gringo-5.4.0/clasp/src/clause.cpp:745:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(head_, w, std::min((uint32)ClauseHead::HEAD_LITS, shared_lits->size())*sizeof(Literal));
data/gringo-5.4.0/clasp/src/clause.cpp:894:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(lits_ + 1, c1.lits, c1.size * sizeof(Literal));
data/gringo-5.4.0/clasp/src/minimize_constraint.cpp:283:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(lhs, rhs, size_*sizeof(wsum_t));
data/gringo-5.4.0/clasp/src/minimize_constraint.cpp:1434:95:  [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).
uint32 UncoreMinimize::allocCore(WeightConstraint* con, weight_t bound, weight_t weight, bool open) {
data/gringo-5.4.0/clasp/src/minimize_constraint.cpp:1435: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).
	if (!open) {
data/gringo-5.4.0/clasp/src/program_builder.cpp:167: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).
	if (rep.open()) {
data/gringo-5.4.0/clasp/src/shared_context.cpp:491:56:  [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).
void SatPreprocessor::extendModel(ValueVec& m, LitVec& open) {
data/gringo-5.4.0/clasp/src/shared_context.cpp:492: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).
	if (!open.empty()) {
data/gringo-5.4.0/clasp/src/shared_context.cpp:494:3:  [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).
		open.back() = ~open.back();
data/gringo-5.4.0/clasp/src/shared_context.cpp:494:18:  [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).
		open.back() = ~open.back();
data/gringo-5.4.0/clasp/src/shared_context.cpp:496:19:  [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).
	doExtendModel(m, open);
data/gringo-5.4.0/clasp/src/shared_context.cpp:498: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).
	while (!open.empty() && open.back().sign()) {
data/gringo-5.4.0/clasp/src/shared_context.cpp:498:26:  [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).
	while (!open.empty() && open.back().sign()) {
data/gringo-5.4.0/clasp/src/shared_context.cpp:499:3:  [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).
		open.pop_back();
data/gringo-5.4.0/clasp/src/shared_context.cpp:508:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(lits_, lits, size*sizeof(Literal));
data/gringo-5.4.0/clasp/src/shared_context.cpp:547:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(mem + sizeof(RefCount), str, len);
data/gringo-5.4.0/clasp/src/solver.cpp:45:59:  [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).
	State  decodeState(uint32 epoch) const { return epoch <= open ? state_open : static_cast<State>(epoch - open); }
data/gringo-5.4.0/clasp/src/solver.cpp:45:106:  [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).
	State  decodeState(uint32 epoch) const { return epoch <= open ? state_open : static_cast<State>(epoch - open); }
data/gringo-5.4.0/clasp/src/solver.cpp:49: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).
	uint32 open;
data/gringo-5.4.0/clasp/src/solver.cpp:1316:91:  [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).
		for (LitVec::const_iterator it = conflict_.begin(), end = conflict_.end(); it != end && open; ++it) {
data/gringo-5.4.0/clasp/src/solver.cpp:1322: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).
		rhs = open ? 0 : otfsRemove(rhs, &cc);
data/gringo-5.4.0/clasp/src/statistics.cpp:343: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 temp[1024]; const char* top, *parent = path;
data/gringo-5.4.0/clasp/src/statistics.cpp:349:28:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			top = (const char*)std::memcpy(temp, top, len);
data/gringo-5.4.0/clasp/src/weight_constraint.cpp:152:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(x->lits, this->lits, litSize);
data/gringo-5.4.0/clasp/src/weight_constraint.cpp:214:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	assert(rep.open() || (rep.sat() && addSat));
data/gringo-5.4.0/clasp/src/weight_constraint.cpp:324:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(undo_, other.undo_, sizeof(UndoInfo)*(size()+isWeight()));
data/gringo-5.4.0/clasp/tests/catch.hpp:1594:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    struct TrueType { char sizer[1]; };
data/gringo-5.4.0/clasp/tests/catch.hpp:1595:24:  [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.
    struct FalseType { char sizer[2]; };
data/gringo-5.4.0/clasp/tests/catch.hpp:3185:13:  [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 storage[sizeof(T)];
data/gringo-5.4.0/clasp/tests/catch.hpp:6161:14:  [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).
        void open() {
data/gringo-5.4.0/clasp/tests/catch.hpp:6255:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                open();
data/gringo-5.4.0/clasp/tests/catch.hpp:6301:26:  [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).
                tracker->open();
data/gringo-5.4.0/clasp/tests/catch.hpp:6490:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char altStackMem[SIGSTKSZ];
data/gringo-5.4.0/clasp/tests/catch.hpp:7084:35:  [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 **utf8Argv = new char *[ argc ];
data/gringo-5.4.0/clasp/tests/catch.hpp:7584: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.
        char data[bufferSize];
data/gringo-5.4.0/clasp/tests/catch.hpp:7621: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).
        m_ofs.open( filename.c_str() );
data/gringo-5.4.0/clasp/tests/catch.hpp:8856:21:  [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 asChar[sizeof (int)];
data/gringo-5.4.0/clasp/tests/catch.hpp:9491:13:  [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[maxDoubleSize];
data/gringo-5.4.0/clasp/tests/catch.hpp:9498:13:  [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(buffer, "%.3f", duration);
data/gringo-5.4.0/clasp/tests/catch.hpp:9724:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/gringo-5.4.0/clasp/tests/catch.hpp:10304:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/libclingo/tests/catch.hpp:1816:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/libclingo/tests/catch.hpp:4854:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        alignas(alignof(T)) char storage[sizeof(T)];
data/gringo-5.4.0/libclingo/tests/catch.hpp:5313:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/gringo-5.4.0/libclingo/tests/catch.hpp:5876:14:  [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).
        void open();
data/gringo-5.4.0/libclingo/tests/catch.hpp:9309:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &f, sizeof(f));
data/gringo-5.4.0/libclingo/tests/catch.hpp:9318:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &d, sizeof(d));
data/gringo-5.4.0/libclingo/tests/catch.hpp:9733: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.
        char m_buffer[L_tmpnam] = { 0 };
data/gringo-5.4.0/libclingo/tests/catch.hpp:9820:13:  [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/gringo-5.4.0/libclingo/tests/catch.hpp:9829:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        m_file = std::tmpfile();
data/gringo-5.4.0/libclingo/tests/catch.hpp:9853: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.
        char buffer[100] = {};
data/gringo-5.4.0/libclingo/tests/catch.hpp:10269:30:  [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).
                    tracker->open();
data/gringo-5.4.0/libclingo/tests/catch.hpp:11024:31:  [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 **utf8Argv = new char *[ argc ];
data/gringo-5.4.0/libclingo/tests/catch.hpp:11178:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[bufferSize];
data/gringo-5.4.0/libclingo/tests/catch.hpp:11227:23:  [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).
                m_ofs.open( filename.c_str() );
data/gringo-5.4.0/libclingo/tests/catch.hpp:11458:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( m_data, m_start, m_size );
data/gringo-5.4.0/libclingo/tests/catch.hpp:11971:23:  [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).
    void TrackerBase::open() {
data/gringo-5.4.0/libclingo/tests/catch.hpp:12071:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            open();
data/gringo-5.4.0/libclingo/tests/catch.hpp:12356:21:  [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 asChar[sizeof (int)];
data/gringo-5.4.0/libclingo/tests/catch.hpp:13013: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.
        char buffer[maxDoubleSize];
data/gringo-5.4.0/libclingo/tests/catch.hpp:13020:14:  [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.
        std::sprintf(buffer, "%.3f", duration);
data/gringo-5.4.0/libclingo/tests/catch.hpp:13588: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).
    void open() {
data/gringo-5.4.0/libclingo/tests/catch.hpp:13617: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).
        tp.open();
data/gringo-5.4.0/libclingo/tests/catch.hpp:13963:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/libclingo/tests/clingo.cc:99:25:  [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 temp[L_tmpnam];
data/gringo-5.4.0/libgringo/gen/src/input/groundtermgrammar/grammar.cc:970: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/gringo-5.4.0/libgringo/gen/src/input/nongroundgrammar/grammar.cc:2763: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/gringo-5.4.0/libgringo/src/ground/statements.cc:135: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).
        SC::EntVec open;
data/gringo-5.4.0/libgringo/src/ground/statements.cc:136: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).
        s.init(open);
data/gringo-5.4.0/libgringo/src/ground/statements.cc:137:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        while (!open.empty()) {
data/gringo-5.4.0/libgringo/src/ground/statements.cc:138:28:  [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).
            for (auto it = open.begin(), end = open.end() - 1; it != end; ++it) {
data/gringo-5.4.0/libgringo/src/ground/statements.cc:138:48:  [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).
            for (auto it = open.begin(), end = open.end() - 1; it != end; ++it) {
data/gringo-5.4.0/libgringo/src/ground/statements.cc:139:39:  [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).
                if (pred((*it)->data, open.back()->data)) { std::swap(open.back(), *it); }
data/gringo-5.4.0/libgringo/src/ground/statements.cc:139:71:  [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).
                if (pred((*it)->data, open.back()->data)) { std::swap(open.back(), *it); }
data/gringo-5.4.0/libgringo/src/ground/statements.cc:141:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            auto y = open.back();
data/gringo-5.4.0/libgringo/src/ground/statements.cc:160:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            open.pop_back();
data/gringo-5.4.0/libgringo/src/ground/statements.cc:161:28:  [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).
            s.propagate(y, open);
data/gringo-5.4.0/libgringo/src/input/aggregate.cc:67:19:  [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).
    auto vars(dep.open());
data/gringo-5.4.0/libgringo/src/input/statement.cc:185: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).
    LitDep::EntVec open;
data/gringo-5.4.0/libgringo/src/input/statement.cc:186: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).
    open.reserve(body.size()); // Note: keeps iterators valid
data/gringo-5.4.0/libgringo/src/input/statement.cc:188:14:  [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).
    dep.init(open);
data/gringo-5.4.0/libgringo/src/input/statement.cc:190:36:  [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).
    for (std::size_t it = 0; it != open.size(); ) {
data/gringo-5.4.0/libgringo/src/input/statement.cc:192: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).
        for (; it != open.size(); ++it) {
data/gringo-5.4.0/libgringo/src/input/statement.cc:193:19:  [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).
            if (!(open[it])->data->isAssignment()) {
data/gringo-5.4.0/libgringo/src/input/statement.cc:194:31:  [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).
                dep.propagate(open[it], open, &bound);
data/gringo-5.4.0/libgringo/src/input/statement.cc:194:41:  [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).
                dep.propagate(open[it], open, &bound);
data/gringo-5.4.0/libgringo/src/input/statement.cc:195:48:  [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).
                sorted.emplace_back(std::move((open[it])->data));
data/gringo-5.4.0/libgringo/src/input/statement.cc:197:40:  [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).
            else { assign.emplace_back(open[it]); }
data/gringo-5.4.0/libgringo/src/input/statement.cc:212:38:  [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).
                    dep.propagate(x, open, &bound);
data/gringo-5.4.0/libgringo/src/input/statement.cc:217:50:  [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).
                dep.propagate(nextAssign.back(), open, &bound);
data/gringo-5.4.0/libgringo/src/output/statements.cc:826:64:  [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).
constexpr Translator::ClauseKey Translator::ClauseKeyLiterals::open;
data/gringo-5.4.0/libgringo/src/output/theory.cc:695:17:  [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[2] = { *name.symbol(), 0 };
data/gringo-5.4.0/libgringo/src/symbol.cc:130:57:  [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).
constexpr typename Unique<T>::Open Unique<T>::Literals::open;
data/gringo-5.4.0/libgringo/src/symbol.cc:155:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(buf.get(), str.first, sizeof(char) * str.size);
data/gringo-5.4.0/libgringo/src/symbol.cc:208:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(static_cast<void*>(args_), args.first, args.size * sizeof(Symbol));
data/gringo-5.4.0/libgringo/tests/catch.hpp:1816:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/libgringo/tests/catch.hpp:4854:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        alignas(alignof(T)) char storage[sizeof(T)];
data/gringo-5.4.0/libgringo/tests/catch.hpp:5313:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/gringo-5.4.0/libgringo/tests/catch.hpp:5876:14:  [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).
        void open();
data/gringo-5.4.0/libgringo/tests/catch.hpp:9309:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &f, sizeof(f));
data/gringo-5.4.0/libgringo/tests/catch.hpp:9318:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &d, sizeof(d));
data/gringo-5.4.0/libgringo/tests/catch.hpp:9733: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.
        char m_buffer[L_tmpnam] = { 0 };
data/gringo-5.4.0/libgringo/tests/catch.hpp:9820:13:  [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/gringo-5.4.0/libgringo/tests/catch.hpp:9829:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        m_file = std::tmpfile();
data/gringo-5.4.0/libgringo/tests/catch.hpp:9853: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.
        char buffer[100] = {};
data/gringo-5.4.0/libgringo/tests/catch.hpp:10269:30:  [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).
                    tracker->open();
data/gringo-5.4.0/libgringo/tests/catch.hpp:11024:31:  [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 **utf8Argv = new char *[ argc ];
data/gringo-5.4.0/libgringo/tests/catch.hpp:11178:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[bufferSize];
data/gringo-5.4.0/libgringo/tests/catch.hpp:11227:23:  [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).
                m_ofs.open( filename.c_str() );
data/gringo-5.4.0/libgringo/tests/catch.hpp:11458:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( m_data, m_start, m_size );
data/gringo-5.4.0/libgringo/tests/catch.hpp:11971:23:  [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).
    void TrackerBase::open() {
data/gringo-5.4.0/libgringo/tests/catch.hpp:12071:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            open();
data/gringo-5.4.0/libgringo/tests/catch.hpp:12356:21:  [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 asChar[sizeof (int)];
data/gringo-5.4.0/libgringo/tests/catch.hpp:13013: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.
        char buffer[maxDoubleSize];
data/gringo-5.4.0/libgringo/tests/catch.hpp:13020:14:  [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.
        std::sprintf(buffer, "%.3f", duration);
data/gringo-5.4.0/libgringo/tests/catch.hpp:13588: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).
    void open() {
data/gringo-5.4.0/libgringo/tests/catch.hpp:13617: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).
        tp.open();
data/gringo-5.4.0/libgringo/tests/catch.hpp:13963:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/libgringo/tests/safetycheck.cc:56:37:  [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).
    std::vector<std::string> order, open;
data/gringo-5.4.0/libgringo/tests/safetycheck.cc:58:24:  [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).
    for (auto &x : dep.open()) { open.push_back(x->data); }
data/gringo-5.4.0/libgringo/tests/safetycheck.cc:58:34:  [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).
    for (auto &x : dep.open()) { open.push_back(x->data); }
data/gringo-5.4.0/libgringo/tests/safetycheck.cc:59: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).
    std::sort(open.begin(), open.end());
data/gringo-5.4.0/libgringo/tests/safetycheck.cc:59:29:  [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).
    std::sort(open.begin(), open.end());
data/gringo-5.4.0/libgringo/tests/safetycheck.cc:60:65:  [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).
    return to_string(std::make_pair(std::move(order), std::move(open)));
data/gringo-5.4.0/libreify/tests/catch.hpp:1816:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/libreify/tests/catch.hpp:4854:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        alignas(alignof(T)) char storage[sizeof(T)];
data/gringo-5.4.0/libreify/tests/catch.hpp:5313:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/gringo-5.4.0/libreify/tests/catch.hpp:5876:14:  [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).
        void open();
data/gringo-5.4.0/libreify/tests/catch.hpp:9309:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &f, sizeof(f));
data/gringo-5.4.0/libreify/tests/catch.hpp:9318:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &d, sizeof(d));
data/gringo-5.4.0/libreify/tests/catch.hpp:9733: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.
        char m_buffer[L_tmpnam] = { 0 };
data/gringo-5.4.0/libreify/tests/catch.hpp:9820:13:  [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/gringo-5.4.0/libreify/tests/catch.hpp:9829:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        m_file = std::tmpfile();
data/gringo-5.4.0/libreify/tests/catch.hpp:9853: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.
        char buffer[100] = {};
data/gringo-5.4.0/libreify/tests/catch.hpp:10269:30:  [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).
                    tracker->open();
data/gringo-5.4.0/libreify/tests/catch.hpp:11024:31:  [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 **utf8Argv = new char *[ argc ];
data/gringo-5.4.0/libreify/tests/catch.hpp:11178:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[bufferSize];
data/gringo-5.4.0/libreify/tests/catch.hpp:11227:23:  [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).
                m_ofs.open( filename.c_str() );
data/gringo-5.4.0/libreify/tests/catch.hpp:11458:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( m_data, m_start, m_size );
data/gringo-5.4.0/libreify/tests/catch.hpp:11971:23:  [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).
    void TrackerBase::open() {
data/gringo-5.4.0/libreify/tests/catch.hpp:12071:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            open();
data/gringo-5.4.0/libreify/tests/catch.hpp:12356:21:  [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 asChar[sizeof (int)];
data/gringo-5.4.0/libreify/tests/catch.hpp:13013: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.
        char buffer[maxDoubleSize];
data/gringo-5.4.0/libreify/tests/catch.hpp:13020:14:  [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.
        std::sprintf(buffer, "%.3f", duration);
data/gringo-5.4.0/libreify/tests/catch.hpp:13588: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).
    void open() {
data/gringo-5.4.0/libreify/tests/catch.hpp:13617: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).
        tp.open();
data/gringo-5.4.0/libreify/tests/catch.hpp:13963:13:  [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 timeStamp[timeStampSize];
data/gringo-5.4.0/clasp/app/clasp_app.cpp:354:31:  [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 (std::size_t size = std::strlen(opts), n = maxW - minW; n < size;) {
data/gringo-5.4.0/clasp/app/clasp_app.cpp:504:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (clasp.read()) {
data/gringo-5.4.0/clasp/clasp/clasp_facade.h:331:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bool               read();
data/gringo-5.4.0/clasp/clasp/util/pod_vector.h:531:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		&& std::equal(lhs.begin(), lhs.end(), rhs.begin());
data/gringo-5.4.0/clasp/libpotassco/potassco/string_convert.h:240:26:  [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).
	std::size_t xLen = std::strlen(x);
data/gringo-5.4.0/clasp/libpotassco/src/application.cpp:284:68:  [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).
	printf("Default command-line:\n%s %s\n", getName(), root.defaults(strlen(getName())+1).c_str());
data/gringo-5.4.0/clasp/libpotassco/src/convert.cpp:311:37:  [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).
		out_.output(toSpan(it->name, std::strlen(it->name)), toSpan(&x, 1));
data/gringo-5.4.0/clasp/libpotassco/src/match_basic_types.cpp:89:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	str_.read(buf_ + rpos_, n);
data/gringo-5.4.0/clasp/libpotassco/src/match_basic_types.cpp:99:26:  [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).
	std::size_t wLen = std::strlen(w);
data/gringo-5.4.0/clasp/libpotassco/src/match_basic_types.cpp:198:25:  [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).
	std::size_t len = std::strlen(word);
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:56:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		else { ap = "|no"; bufSize += strlen(ap); }
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:75:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	std::size_t minS = strlen(desc);
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:93:50:  [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 (temp) { buf.insert(buf.end(), temp, temp + strlen(temp)); }
data/gringo-5.4.0/clasp/libpotassco/src/program_options.cpp:207:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	std::size_t argN = strlen(argName());
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:42:26:  [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).
	std::size_t xLen = std::strlen(x);
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:236:30:  [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 (errPos) { *errPos = x + strlen(x); }
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:372: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).
	return str && *str ? append(str, std::strlen(str)) : *this;
data/gringo-5.4.0/clasp/libpotassco/src/string_convert.cpp:398: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).
	std::size_t x = p ? static_cast<std::size_t>(p - fmt) : std::strlen(fmt);
data/gringo-5.4.0/clasp/libpotassco/src/theory_data.cpp:215:60:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return addTerm(termId, Potassco::toSpan(name, name ? std::strlen(name) : 0));
data/gringo-5.4.0/clasp/libpotassco/src/theory_data.cpp:360:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return Potassco::toSpan(x, std::strlen(x));
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:8467:50:  [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 s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/gringo-5.4.0/clasp/libpotassco/tests/catch.hpp:8473:50:  [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 s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:134:16:  [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.
		REQUIRE(std::equal(begin(lits), end(lits), rb.lits_begin()));
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:143:16:  [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.
		REQUIRE(std::equal(begin(sum), end(sum), rb.wlits_begin()));
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:154:16:  [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.
		REQUIRE(std::equal(begin(sum), end(sum), rb.wlits_begin()));
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:164:16:  [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.
		REQUIRE(std::equal(rb.lits_begin(), rb.lits_end(), begin(lits)));
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:173:16:  [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.
		REQUIRE(std::equal(begin(lits), end(lits), rb.lits_begin()));
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:289:16:  [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.
		REQUIRE(std::equal(begin(exp), end(exp), observer.externals.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:327:16:  [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.
		REQUIRE(std::equal(std::begin(exp), std::end(exp), observer.heuristics.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:480:16:  [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.
		REQUIRE(std::equal(a, a+3, observer.assumes.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:489:16:  [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.
		REQUIRE(std::equal(a, a+3, observer.projects.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:500:16:  [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.
		REQUIRE(std::equal(std::begin(exp), std::end(exp), observer.edges.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_aspif.cpp:514:16:  [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.
		REQUIRE(std::equal(std::begin(exp), std::end(exp), observer.heuristics.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_smodels.cpp:540:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return Potassco::toSpan(str, std::strlen(str));
data/gringo-5.4.0/clasp/libpotassco/tests/test_smodels.cpp:603:16:  [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.
		REQUIRE(std::equal(std::begin(exp), std::end(exp), observer.heuristics.begin()) == true);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:34:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool read(AspifTextInput& in, std::stringstream& str) {
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:43:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:48:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:53:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:58:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:64:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:70:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:76:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:82:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:87:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:92:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:98:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:104:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:109:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:114:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:119:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:127:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:135:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE_THROWS(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:139:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:144:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:151:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:159:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:168:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:180:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		try { read(prg, input); REQUIRE(false); }
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:194:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		REQUIRE(read(prg, input));
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:199:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:204:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:209:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:214:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:219:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:224:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:229:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:234:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:239:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:244:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:249:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:254:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:259:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:265:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:270:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:277:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:283:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:288:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:294:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:301:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:306:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:311:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(prg, input);
data/gringo-5.4.0/clasp/libpotassco/tests/test_text.cpp:324:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(prg, input);
data/gringo-5.4.0/clasp/src/clasp_facade.cpp:932:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool ClaspFacade::read() {
data/gringo-5.4.0/clasp/src/clasp_options.cpp:584: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).
			std::size_t len = std::strlen(key.name);
data/gringo-5.4.0/clasp/src/clasp_options.cpp:685:60:  [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).
const char* ConfigIter::base() const { return base_ + std::strlen(base_) + 2; }
data/gringo-5.4.0/clasp/src/clasp_options.cpp:686:80:  [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).
const char* ConfigIter::args() const { const char* x = base(); return x + std::strlen(x) + 2; }
data/gringo-5.4.0/clasp/src/clasp_options.cpp:690:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	base_+= std::strlen(base_) + 1;
data/gringo-5.4.0/clasp/src/clasp_options.cpp:802:26:  [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).
	std::size_t wLen = std::strlen(what);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:749: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).
			std::size_t len = std::strlen(catAtom);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:765: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).
	width_  = 13+(int)strlen(format[cat_comment]);
data/gringo-5.4.0/clasp/src/clasp_output.cpp:796:11:  [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 (std::strlen(res)) { printLN(cat_result, "%s", res); }
data/gringo-5.4.0/clasp/src/logic_program.cpp:477:57:  [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).
			out.output(Potassco::toSpan(it->second.c_str(), std::strlen(it->second.c_str())), Potassco::toSpan(lits));
data/gringo-5.4.0/clasp/src/minimize_constraint.cpp:144:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	assert(lev <= w->level && std::equal(lhs, lhs+lev, rhs));
data/gringo-5.4.0/clasp/src/shared_context.cpp:574:139:  [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).
ConstString::ConstString(const char* str, Ownership_t::Type o) : ref_(str && *str && o == Ownership_t::Acquire ? StrRef::create(str, std::strlen(str)) : StrRef::lit(str)) {}
data/gringo-5.4.0/clasp/src/statistics.cpp:241:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return *strings_.insert(it, std::strcpy(new char[std::strlen(s) + 1], s));
data/gringo-5.4.0/clasp/tests/catch.hpp:8577:50:  [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 s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/gringo-5.4.0/clasp/tests/catch.hpp:8583:50:  [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 s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/gringo-5.4.0/clasp/tests/minimize_test.cpp:250:16:  [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.
		REQUIRE(std::equal(d1->adjust(), d1->adjust() + d1->numRules(), d2->adjust()));
data/gringo-5.4.0/clasp/tests/program_builder_test.cpp:1103:36:  [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.
		REQUIRE((ext.size() == 2 && std::equal(ext.begin(), ext.end(), cond)));
data/gringo-5.4.0/clasp/tests/rule_test.cpp:33:38:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	return lhs.size == rhs.size && std::equal(begin(lhs), end(lhs), begin(rhs));
data/gringo-5.4.0/clasp/tests/rule_test.cpp:36:74:  [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 lhs.bound == rhs.bound && lhs.lits.size == rhs.lits.size && std::equal(begin(lhs.lits), end(lhs.lits), begin(rhs.lits));
data/gringo-5.4.0/clasp/tests/rule_test.cpp:39:68:  [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 lhs.ht == rhs.ht && lhs.head.size == rhs.head.size && std::equal(begin(lhs.head), end(lhs.head), rhs.head.first)
data/gringo-5.4.0/examples/c/application.c:56: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 (!(*program = (char *)malloc(strlen(value) + 1))) {
data/gringo-5.4.0/examples/c/backend.c:124: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.
    bool equal;
data/gringo-5.4.0/examples/c/backend.c:130:79:  [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 (!clingo_symbolic_atoms_iterator_is_equal_to(atoms, atom_it, atom_ie, &equal)) { goto error; }
data/gringo-5.4.0/examples/c/backend.c:131:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    assert(!equal); (void)equal;
data/gringo-5.4.0/examples/c/backend.c:131:27:  [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.
    assert(!equal); (void)equal;
data/gringo-5.4.0/examples/c/propagator.c:93:12:  [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.
      bool equal;
data/gringo-5.4.0/examples/c/propagator.c:98:83:  [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 (!clingo_symbolic_atoms_iterator_is_equal_to(atoms, atoms_it, atoms_ie, &equal)) { return false; }
data/gringo-5.4.0/examples/c/propagator.c:99:11:  [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) { break; }
data/gringo-5.4.0/examples/c/symbolic-atoms.c:79: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.
    bool equal, fact, external;
data/gringo-5.4.0/examples/c/symbolic-atoms.c:83:81:  [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 (!clingo_symbolic_atoms_iterator_is_equal_to(atoms, it_atoms, ie_atoms, &equal)) { goto error; }
data/gringo-5.4.0/examples/c/symbolic-atoms.c:85: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) { break; }
data/gringo-5.4.0/libclingo/clingo.h:573:189:  [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.
CLINGO_VISIBILITY_DEFAULT bool clingo_symbolic_atoms_iterator_is_equal_to(clingo_symbolic_atoms_t const *atoms, clingo_symbolic_atom_iterator_t a, clingo_symbolic_atom_iterator_t b, bool *equal);
data/gringo-5.4.0/libclingo/src/control.cc:1541:26:  [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 *ret = new char[strlen(str) + 1];
data/gringo-5.4.0/libclingo/tests/catch.hpp:11053:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/gringo-5.4.0/libclingo/tests/catch.hpp:11058:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/gringo-5.4.0/libclingo/tests/catch.hpp:11349:50:  [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 s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/gringo-5.4.0/libclingo/tests/catch.hpp:11355:50:  [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 s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/gringo-5.4.0/libclingo/tests/catch.hpp:11426:67:  [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).
    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
data/gringo-5.4.0/libclingo/tests/symbol.cc:84:64:  [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.
        REQUIRE((args.size() == sym.arguments().size() && std::equal(args.begin(), args.end(), sym.arguments().begin())));
data/gringo-5.4.0/libgringo/src/output/theory.cc:45:135:  [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 term.type() == Potassco::Theory_t::Compound && term.isTuple() && term.tuple() == type && term.size() == terms.size && std::equal(term.begin(), term.end(), Potassco::begin(terms));
data/gringo-5.4.0/libgringo/src/output/theory.cc:49:141:  [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 term.type() == Potassco::Theory_t::Compound && term.isFunction() && term.function() == name && term.size() == terms.size && std::equal(term.begin(), term.end(), Potassco::begin(terms));
data/gringo-5.4.0/libgringo/src/output/theory.cc:53:78:  [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 is_value_equal_to(condA, condB) && a.size() == tuple.size && std::equal(a.begin(), a.end(), Potassco::begin(tuple));
data/gringo-5.4.0/libgringo/src/output/theory.cc:57:79:  [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 !a.guard() && a.term() == termId && a.size() == elems.size && std::equal(a.begin(), a.end(), Potassco::begin(elems));
data/gringo-5.4.0/libgringo/src/output/theory.cc:61:120:  [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 a.guard() && *a.guard() == guard && *a.rhs() == rhs && a.term() == termId && a.size() == elems.size && std::equal(a.begin(), a.end(), Potassco::begin(elems));
data/gringo-5.4.0/libgringo/src/symbol.cc:86:72:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        bool operator()(Unique const &a, U const &b) const { return T::equal(*a.ptr_, b); }
data/gringo-5.4.0/libgringo/src/symbol.cc:146:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(char const &a, char const &b) { return std::strcmp(&a, &b) == 0; }
data/gringo-5.4.0/libgringo/src/symbol.cc:147:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(char const &a, StringSpan b) { return std::strncmp(&a, b.first, b.size) == 0 && (&a)[b.size] == '\0'; }
data/gringo-5.4.0/libgringo/src/symbol.cc:149:51:  [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).
        std::unique_ptr<char[]> buf{new char[std::strlen(&str) + 1]};
data/gringo-5.4.0/libgringo/src/symbol.cc:169:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(Type const &a, Type const &b) { return a == b; }
data/gringo-5.4.0/libgringo/src/symbol.cc:194: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.
    bool equal(Sig sig, SymSpan args) const {
data/gringo-5.4.0/libgringo/src/symbol.cc:195:36:  [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 sig_ == sig && std::equal(begin(args), end(args), args_);
data/gringo-5.4.0/libgringo/src/symbol.cc:220:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(Type const &a, Type const &b) { return a.equal(b.sig(), b.args()); }
data/gringo-5.4.0/libgringo/src/symbol.cc:220:64:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(Type const &a, Type const &b) { return a.equal(b.sig(), b.args()); }
data/gringo-5.4.0/libgringo/src/symbol.cc:221:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(Type const &a, Cons const &b) { return a.equal(b.first, b.second); }
data/gringo-5.4.0/libgringo/src/symbol.cc:221:64:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static bool equal(Type const &a, Cons const &b) { return a.equal(b.first, b.second); }
data/gringo-5.4.0/libgringo/tests/catch.hpp:11053:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/gringo-5.4.0/libgringo/tests/catch.hpp:11058:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/gringo-5.4.0/libgringo/tests/catch.hpp:11349:50:  [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 s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/gringo-5.4.0/libgringo/tests/catch.hpp:11355:50:  [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 s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/gringo-5.4.0/libgringo/tests/catch.hpp:11426:67:  [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).
    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
data/gringo-5.4.0/libluaclingo/luaclingo.cc:3623:54:  [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 ret = luaL_loadbuffer(self.L, code, std::strlen(code), name.c_str());
data/gringo-5.4.0/libpyclingo/pyclingo.cc:8645:49:  [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.
    shown if the argument to help is greater or equal to `l`.
data/gringo-5.4.0/libreify/tests/catch.hpp:11053:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/gringo-5.4.0/libreify/tests/catch.hpp:11058:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/gringo-5.4.0/libreify/tests/catch.hpp:11349:50:  [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 s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/gringo-5.4.0/libreify/tests/catch.hpp:11355:50:  [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 s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/gringo-5.4.0/libreify/tests/catch.hpp:11426:67:  [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).
    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
data/gringo-5.4.0/libreify/tests/program.cc:9:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool read(std::stringstream &in, std::stringstream &out, bool scc = false, bool step = false) {
data/gringo-5.4.0/libreify/tests/program.cc:19:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:24:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:29:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:49:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output, false, true));
data/gringo-5.4.0/libreify/tests/program.cc:68:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output, true));
data/gringo-5.4.0/libreify/tests/program.cc:73:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:78:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:83:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:88:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:93:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:98:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:103:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:109:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));
data/gringo-5.4.0/libreify/tests/program.cc:115:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(input, output));

ANALYSIS SUMMARY:

Hits = 452
Lines analyzed = 193406 in approximately 5.06 seconds (38230 lines/second)
Physical Source Lines of Code (SLOC) = 149597
Hits@level = [0] 207 [1] 165 [2] 227 [3]  23 [4]  37 [5]   0
Hits@level+ = [0+] 659 [1+] 452 [2+] 287 [3+]  60 [4+]  37 [5+]   0
Hits/KSLOC@level+ = [0+] 4.40517 [1+] 3.02145 [2+] 1.91849 [3+] 0.401078 [4+] 0.247331 [5+]   0
Dot directories skipped = 1 (--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.