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/ohcount-4.0.0/src/detector.c
Examining data/ohcount-4.0.0/src/detector.h
Examining data/ohcount-4.0.0/src/diff.h
Examining data/ohcount-4.0.0/src/languages.h
Examining data/ohcount-4.0.0/src/licenses.c
Examining data/ohcount-4.0.0/src/licenses.h
Examining data/ohcount-4.0.0/src/loc.c
Examining data/ohcount-4.0.0/src/loc.h
Examining data/ohcount-4.0.0/src/log.c
Examining data/ohcount-4.0.0/src/log.h
Examining data/ohcount-4.0.0/src/ohcount.c
Examining data/ohcount-4.0.0/src/ohcount.h
Examining data/ohcount-4.0.0/src/parsed_language.c
Examining data/ohcount-4.0.0/src/parsed_language.h
Examining data/ohcount-4.0.0/src/parser.c
Examining data/ohcount-4.0.0/src/parser.h
Examining data/ohcount-4.0.0/src/parser_macros.h
Examining data/ohcount-4.0.0/src/sourcefile.c
Examining data/ohcount-4.0.0/src/sourcefile.h
Examining data/ohcount-4.0.0/src/structs.h
Examining data/ohcount-4.0.0/src/diff.c
Examining data/ohcount-4.0.0/test/detect_files/foo.c
Examining data/ohcount-4.0.0/test/detect_files/foo.ec
Examining data/ohcount-4.0.0/test/detect_files/foo_objective_c.h
Examining data/ohcount-4.0.0/test/detect_files/foo_upper_case.C
Examining data/ohcount-4.0.0/test/detect_files/uses_cpp_headers.h
Examining data/ohcount-4.0.0/test/detect_files/uses_cpp_keywords.h
Examining data/ohcount-4.0.0/test/detect_files/uses_cpp_stdlib_headers.h
Examining data/ohcount-4.0.0/test/detect_files/uses_no_cpp.h
Examining data/ohcount-4.0.0/test/expected_dir/c1.c
Examining data/ohcount-4.0.0/test/expected_dir/c_str.c
Examining data/ohcount-4.0.0/test/expected_dir/diff2_new.c
Examining data/ohcount-4.0.0/test/expected_dir/diff2_old.c
Examining data/ohcount-4.0.0/test/gestalt_files/gtk/simple.c
Examining data/ohcount-4.0.0/test/gestalt_files/kde/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/mac/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/msdos/bar.c
Examining data/ohcount-4.0.0/test/gestalt_files/msdos/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/posix/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/ruby_just_enough/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/ruby_not_enough/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/win32_enough/bar.c
Examining data/ohcount-4.0.0/test/gestalt_files/win32_enough/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/win32_not_enough/foo.c
Examining data/ohcount-4.0.0/test/gestalt_files/wx_widgets/main.h
Examining data/ohcount-4.0.0/test/gestalt_files/xwindows/foo.c
Examining data/ohcount-4.0.0/test/src_dir/c1.c
Examining data/ohcount-4.0.0/test/src_dir/c_str.c
Examining data/ohcount-4.0.0/test/src_dir/diff2_new.c
Examining data/ohcount-4.0.0/test/src_dir/diff2_old.c
Examining data/ohcount-4.0.0/test/src_licenses/academic_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/apache_2_t1.cpp
Examining data/ohcount-4.0.0/test/src_licenses/apache_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/attribution_assurance_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/avr-drv.c
Examining data/ohcount-4.0.0/test/src_licenses/boost_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/boost_t2.c
Examining data/ohcount-4.0.0/test/src_licenses/bsd_2clause_ish_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/bsd_ish_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/bsd_ish_t2.c
Examining data/ohcount-4.0.0/test/src_licenses/bsd_ish_t3.c
Examining data/ohcount-4.0.0/test/src_licenses/cecill-b.c
Examining data/ohcount-4.0.0/test/src_licenses/cecill-c.c
Examining data/ohcount-4.0.0/test/src_licenses/cecill.c
Examining data/ohcount-4.0.0/test/src_licenses/common_development_and_distribution_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/common_public_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/computer_associates_trusted_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/cua_office_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/educational_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/eiffel_2_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/eiffel_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/entessa_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/eu_datagrid_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/fair_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/frameworx_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl3_or_later_t2.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl3_or_later_t3.cpp
Examining data/ohcount-4.0.0/test/src_licenses/gpl3_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl_line_wrap_1.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl_t2.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl_t3.c
Examining data/ohcount-4.0.0/test/src_licenses/gpl_t4.c
Examining data/ohcount-4.0.0/test/src_licenses/historical_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/ibm_public_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/intel_open_source_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/jabber_open_source_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/lgpl3_t2.C
Examining data/ohcount-4.0.0/test/src_licenses/lgpl_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/lgpl_t2.c
Examining data/ohcount-4.0.0/test/src_licenses/lgpl_t3.c
Examining data/ohcount-4.0.0/test/src_licenses/lgpl_t4.c
Examining data/ohcount-4.0.0/test/src_licenses/lgpl_t5.c
Examining data/ohcount-4.0.0/test/src_licenses/lucent_plan9_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/lucent_public_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/mit_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/mit_t2.c
Examining data/ohcount-4.0.0/test/src_licenses/mitre_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/motosoto_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/mozilla_public_1_1_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/mozilla_public_1_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/nasa_open_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/naumen_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/nethack_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/nokia_open_source_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/oclc_research_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/open_group_test_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/open_software_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/qt_public_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/realnetworks_public_source_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/reciprocal_public_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/ricoh_source_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/sleepycat_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/sugarcrm_1_1_3_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/sun_industry_standards_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/sun_public_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/sybase_open_watcom_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/u_of_i_ncsa_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/vovida_software_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/w3c_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/wtfpl.c
Examining data/ohcount-4.0.0/test/src_licenses/wx_windows_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/x_net_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/zlib_libpng_t1.c
Examining data/ohcount-4.0.0/test/src_licenses/zope_t1.c
Examining data/ohcount-4.0.0/test/symlink_test_dir_target/from_symlink_foo.c
Examining data/ohcount-4.0.0/test/unit/all_tests.c
Examining data/ohcount-4.0.0/test/unit/detector_test.h
Examining data/ohcount-4.0.0/test/unit/license_test.h
Examining data/ohcount-4.0.0/test/unit/loc_test.h
Examining data/ohcount-4.0.0/test/unit/parser_test.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_actionscript.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_ada.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_ampl.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_assembler.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_augeas.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_autoconf.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_automake.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_awk.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_basic.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_bat.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_bfpp.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_blitzmax.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_boo.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_brainfuck.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_c.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_chaiscript.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_clearsilver.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_clearsilvertemplate.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_clojure.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_cmake.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_coq.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_crystal.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_cs_aspx.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_csharp.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_css.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_d.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_dcl.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_dylan.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_ebuild.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_eiffel.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_emacs_lisp.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_erlang.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_exheres.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_factor.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_forth.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_fortran.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_fsharp.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_glsl.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_golang.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_groovy.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_haml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_haskell.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_haxe.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_html.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_idl_pvwave.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_jam.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_java.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_javascript.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_jsp.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_lisp.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_livecode.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_logtalk.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_lua.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_make.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_mathematica.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_matlab.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_metafont.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_metapost.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_mxml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_nix.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_nsis.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_objective_j.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_ocaml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_octave.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_pascal.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_perl.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_pike.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_postscript.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_puppet.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_python.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_qml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_r.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_racket.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_rebol.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_rexx.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_rhtml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_ruby.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_scala.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_scheme.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_scilab.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_shell.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_smalltalk.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_sql.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_stratego.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_tcl.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_tex.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_typescript.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_unrealscript.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_vala.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_vb_aspx.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_vhdl.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_visualbasic.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_xaml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_xml.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_xmlschema.h
Examining data/ohcount-4.0.0/test/unit/parsers/test_xslt.h
Examining data/ohcount-4.0.0/test/unit/sourcefile_test.h

FINAL RESULTS:

data/ohcount-4.0.0/src/diff.c:651:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(command, "diff --normal --suppress-common-lines --new-file '%s' '%s'", from_tmp, to_tmp);
data/ohcount-4.0.0/src/diff.c:652:12:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	FILE *f = popen(command, "r");
data/ohcount-4.0.0/test/expected_dir/c1.c:63:10:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
c	code			sprintf(Message, MESSAGE_4_E,
data/ohcount-4.0.0/test/src_dir/c1.c:63:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(Message, MESSAGE_4_E,
data/ohcount-4.0.0/test/unit/detector_test.h:209: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.
  assert(system("mv ../detect_files/frx1.frx ../detect_files/frx1.frx2") == 0);
data/ohcount-4.0.0/test/unit/detector_test.h:212: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.
  assert(system("mv ../detect_files/frx1.frx2 ../detect_files/frx1.frx") == 0);
data/ohcount-4.0.0/test/unit/parser_test.h:188:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(line2, "%s\t%s\t", language, entity);
data/ohcount-4.0.0/src/detector.c:26:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
# define mkstemp(p) _open(_mktemp(p), _O_CREAT | _O_SHORT_LIVED | _O_EXCL)
data/ohcount-4.0.0/src/detector.c:36: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[80];
data/ohcount-4.0.0/src/detector.c:77:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[80];
data/ohcount-4.0.0/src/detector.c:132: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 lowerext[length + 1];
data/ohcount-4.0.0/src/detector.c:142: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 line[81] = { '\0' }, buf[81];
data/ohcount-4.0.0/src/detector.c:239:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[length];
data/ohcount-4.0.0/src/detector.c:319: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 line[81];
data/ohcount-4.0.0/src/detector.c:553:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char path[length];
data/ohcount-4.0.0/src/detector.c:567: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 line[81], buf[81];
data/ohcount-4.0.0/src/detector.c:653:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[length];
data/ohcount-4.0.0/src/detector.c:737: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 line[81], buf[81];
data/ohcount-4.0.0/src/detector.c:1025: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 line[81];
data/ohcount-4.0.0/src/detector.c:1069: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 lowerext[length];
data/ohcount-4.0.0/src/diff.c:7:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
# define mkstemp(p) _open(_mktemp(p), _O_CREAT | _O_SHORT_LIVED | _O_EXCL)
data/ohcount-4.0.0/src/diff.c:318: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 bufcpy[strlen(buf)+1];
data/ohcount-4.0.0/src/diff.c:628:11:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	int fd = mkstemp(path);
data/ohcount-4.0.0/src/diff.c:650:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char command[1000];
data/ohcount-4.0.0/src/diff.c:654: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 line[10000];
data/ohcount-4.0.0/src/log.c:6:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *f = fopen(LOG_FILE, "a");
data/ohcount-4.0.0/src/ohcount.c:16: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[length];
data/ohcount-4.0.0/src/ohcount.c:275:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      FILE *f = fopen(argv[i], "rb");
data/ohcount-4.0.0/src/sourcefile.c:87:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(path, "rb");
data/ohcount-4.0.0/src/sourcefile.c:372: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 filepath[FILENAME_MAX];
data/ohcount-4.0.0/test/unit/detector_test.h:15: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 dirpath[FILENAME_MAX];
data/ohcount-4.0.0/test/unit/license_test.h:13: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 src[FILENAME_MAX];
data/ohcount-4.0.0/test/unit/license_test.h:18: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 expected[FILENAME_MAX];
data/ohcount-4.0.0/test/unit/license_test.h:40:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *f = fopen((const char *)expected, "rb");
data/ohcount-4.0.0/test/unit/license_test.h:44:11:  [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[40]; // max license name size
data/ohcount-4.0.0/test/unit/parser_test.h:180: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 line[512], line2[512];
data/ohcount-4.0.0/test/unit/parser_test.h:203: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 src[FILENAME_MAX];
data/ohcount-4.0.0/test/unit/parser_test.h:208: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 expected[FILENAME_MAX];
data/ohcount-4.0.0/test/unit/parser_test.h:224:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *f = fopen((const char *)expected, "rb");
data/ohcount-4.0.0/src/detector.c:34:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *eol = line + strlen(line);
data/ohcount-4.0.0/src/detector.c:48:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:65:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:97:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, magic, sizeof(line));
data/ohcount-4.0.0/src/detector.c:103:49:  [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 *magic = magic_buffer(cookie, p, strlen(p));
data/ohcount-4.0.0/src/detector.c:109:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, magic, sizeof(line));
data/ohcount-4.0.0/src/detector.c:126:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  length = strlen(sourcefile->ext);
data/ohcount-4.0.0/src/detector.c:133:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(lowerext, sourcefile->ext, length);
data/ohcount-4.0.0/src/detector.c:150:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(line, p, length);
data/ohcount-4.0.0/src/detector.c:170:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:203:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen(sourcefile->filename);
data/ohcount-4.0.0/src/detector.c:217:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      length = strlen(DISAMBIGUATEWHAT(language));
data/ohcount-4.0.0/src/detector.c:240:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:242: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).
      char *eol = buf + strlen(buf);
data/ohcount-4.0.0/src/detector.c:327:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, p, length);
data/ohcount-4.0.0/src/detector.c:355: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).
      pe = filenames[i] + strlen(filenames[i]);
data/ohcount-4.0.0/src/detector.c:551:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  length = strlen(sourcefile->filename);
data/ohcount-4.0.0/src/detector.c:554:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(path, sourcefile->filename, length);
data/ohcount-4.0.0/src/detector.c:576:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, p, length);
data/ohcount-4.0.0/src/detector.c:578:24:  [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 *eol = line + strlen(line);
data/ohcount-4.0.0/src/detector.c:596:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:604:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:621:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:649:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  pe = p + strlen(p) - 3;
data/ohcount-4.0.0/src/detector.c:654:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:680:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char *eof = p + strlen(p);
data/ohcount-4.0.0/src/detector.c:708:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      pe = p + strlen(p);
data/ohcount-4.0.0/src/detector.c:745:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, p, length);
data/ohcount-4.0.0/src/detector.c:747:24:  [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 *eol = line + strlen(line);
data/ohcount-4.0.0/src/detector.c:798:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(buf, p, length);
data/ohcount-4.0.0/src/detector.c:960:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp(p, QMAKE_SOURCES_SPACE, strlen(QMAKE_SOURCES_SPACE)) == 0 ||
data/ohcount-4.0.0/src/detector.c:961: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).
				strncmp(p, QMAKE_SOURCES, strlen(QMAKE_SOURCES)) == 0 ||
data/ohcount-4.0.0/src/detector.c:962: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).
				strncmp(p, QMAKE_CONFIG_SPACE, strlen(QMAKE_CONFIG_SPACE)) == 0 ||
data/ohcount-4.0.0/src/detector.c:963: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).
				strncmp(p, QMAKE_CONFIG, strlen(QMAKE_CONFIG)) == 0)
data/ohcount-4.0.0/src/detector.c:980:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen(needle);
data/ohcount-4.0.0/src/detector.c:1001:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen(needle);
data/ohcount-4.0.0/src/detector.c:1033:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, p, length);
data/ohcount-4.0.0/src/detector.c:1035:24:  [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 *eol = line + strlen(line);
data/ohcount-4.0.0/src/detector.c:1061:32:  [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 *p = (char *)filename + strlen(filename);
data/ohcount-4.0.0/src/detector.c:1065:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int length = strlen(p);
data/ohcount-4.0.0/src/detector.c:1070:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(lowerext, p, length);
data/ohcount-4.0.0/src/diff.c:300:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(line);
data/ohcount-4.0.0/src/diff.c:318: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).
  char bufcpy[strlen(buf)+1];
data/ohcount-4.0.0/src/diff.c:323:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(bufcpy, buf, strlen(buf));
data/ohcount-4.0.0/src/diff.c:323:24:  [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).
  strncpy(bufcpy, buf, strlen(buf));
data/ohcount-4.0.0/src/diff.c:324:10:  [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).
  bufcpy[strlen(buf)] = 0;
data/ohcount-4.0.0/src/diff.c:629:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (write(fd, buf, strlen(buf)) != strlen(buf)) {
data/ohcount-4.0.0/src/diff.c:629:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (write(fd, buf, strlen(buf)) != strlen(buf)) {
data/ohcount-4.0.0/src/diff.c:676:6:  [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 (strlen(from) > USE_DISK_IF_LARGER || strlen(to) > USE_DISK_IF_LARGER)
data/ohcount-4.0.0/src/diff.c:676:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(from) > USE_DISK_IF_LARGER || strlen(to) > USE_DISK_IF_LARGER)
data/ohcount-4.0.0/src/licenses.c:801:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int buffer_len = p ? strlen(p) : 0;
data/ohcount-4.0.0/src/ohcount.c:17:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(buf, (const char*)sf->contents + start, length); // field exists
data/ohcount-4.0.0/src/ohcount.c:256:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                                               strlen(argv[1]));
data/ohcount-4.0.0/src/parsed_language.c:30:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(parsed_language->code_p, p, length);
data/ohcount-4.0.0/src/parsed_language.c:41:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(parsed_language->comments_p, p, length);
data/ohcount-4.0.0/src/parser.c:19: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).
      ohcount_hash_parser_from_language(language, strlen(language));
data/ohcount-4.0.0/src/sourcefile.c:25:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int length = strlen(filepath);
data/ohcount-4.0.0/src/sourcefile.c:27:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sourcefile->filepath, filepath, length);
data/ohcount-4.0.0/src/sourcefile.c:65:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int size = strlen(diskpath);
data/ohcount-4.0.0/src/sourcefile.c:67:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sourcefile->diskpath, diskpath, size);
data/ohcount-4.0.0/src/sourcefile.c:75:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int size = strlen(contents);
data/ohcount-4.0.0/src/sourcefile.c:77:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sourcefile->contents, contents, size);
data/ohcount-4.0.0/src/sourcefile.c:119:47:  [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).
    ohcount_hash_language_from_name(language, strlen(language));
data/ohcount-4.0.0/src/sourcefile.c:373:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(filepath, directory, strlen(directory));
data/ohcount-4.0.0/src/sourcefile.c:373:32:  [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).
  strncpy(filepath, directory, strlen(directory));
data/ohcount-4.0.0/src/sourcefile.c:374:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  *(filepath + strlen(directory)) = '/';
data/ohcount-4.0.0/src/sourcefile.c:375: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 *f_p = filepath + strlen(directory) + 1;
data/ohcount-4.0.0/src/sourcefile.c:383: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).
      int length = strlen(file->d_name);
data/ohcount-4.0.0/src/sourcefile.c:384:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(f_p, (const char *)file->d_name, length);
data/ohcount-4.0.0/test/unit/detector_test.h:16:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dirpath, sourcefile->filepath, sourcefile->dirpath);
data/ohcount-4.0.0/test/unit/detector_test.h:29:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int len = strlen(file->d_name);
data/ohcount-4.0.0/test/unit/detector_test.h:31:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(filename, file->d_name, len);
data/ohcount-4.0.0/test/unit/license_test.h:14:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(src, src_licenses, strlen(src_licenses));
data/ohcount-4.0.0/test/unit/license_test.h:14: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).
  strncpy(src, src_licenses, strlen(src_licenses));
data/ohcount-4.0.0/test/unit/license_test.h:15: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).
  char *s_p = src + strlen(src_licenses);
data/ohcount-4.0.0/test/unit/license_test.h:19:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(expected, expected_licenses, strlen(expected_licenses));
data/ohcount-4.0.0/test/unit/license_test.h:19: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).
  strncpy(expected, expected_licenses, strlen(expected_licenses));
data/ohcount-4.0.0/test/unit/license_test.h:20: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 *e_p = expected + strlen(expected_licenses);
data/ohcount-4.0.0/test/unit/license_test.h:31:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        length = strlen(file->d_name);
data/ohcount-4.0.0/test/unit/license_test.h:32:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(s_p, (const char *)file->d_name, length);
data/ohcount-4.0.0/test/unit/license_test.h:38:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(e_p, (const char *)file->d_name, length);
data/ohcount-4.0.0/test/unit/license_test.h:70:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(a, "int = 1;\n", strlen("int = 1;\n"));
data/ohcount-4.0.0/test/unit/license_test.h:70: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).
	strncpy(a, "int = 1;\n", strlen("int = 1;\n"));
data/ohcount-4.0.0/test/unit/parser_test.h:190:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(line2 + strlen(language) + strlen(entity) + 2, buffer + start,
data/ohcount-4.0.0/test/unit/parser_test.h:190:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  strncpy(line2 + strlen(language) + strlen(entity) + 2, buffer + start,
data/ohcount-4.0.0/test/unit/parser_test.h:190:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  strncpy(line2 + strlen(language) + strlen(entity) + 2, buffer + start,
data/ohcount-4.0.0/test/unit/parser_test.h:192:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  line2[strlen(language) + strlen(entity) + 2 + (end - start)] = '\0';
data/ohcount-4.0.0/test/unit/parser_test.h:192:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  line2[strlen(language) + strlen(entity) + 2 + (end - start)] = '\0';
data/ohcount-4.0.0/test/unit/parser_test.h:204:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(src, src_dir, strlen(src_dir));
data/ohcount-4.0.0/test/unit/parser_test.h:204: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).
  strncpy(src, src_dir, strlen(src_dir));
data/ohcount-4.0.0/test/unit/parser_test.h:205: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).
  char *s_p = src + strlen(src_dir);
data/ohcount-4.0.0/test/unit/parser_test.h:209:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(expected, expected_dir, strlen(expected_dir));
data/ohcount-4.0.0/test/unit/parser_test.h:209: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).
  strncpy(expected, expected_dir, strlen(expected_dir));
data/ohcount-4.0.0/test/unit/parser_test.h:210: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 *e_p = expected + strlen(expected_dir);
data/ohcount-4.0.0/test/unit/parser_test.h:218:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int length = strlen(file->d_name);
data/ohcount-4.0.0/test/unit/parser_test.h:219:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(s_p, (const char *)file->d_name, length);
data/ohcount-4.0.0/test/unit/parser_test.h:221:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(e_p, (const char *)file->d_name, length);
data/ohcount-4.0.0/test/unit/parsers/test_idl_pvwave.h:21: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).
	assert(ohcount_hash_language_from_name(language, strlen(language)) != NULL);
data/ohcount-4.0.0/test/unit/sourcefile_test.h:138:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(a, "int = 1;\n", strlen("int = 1;\n"));
data/ohcount-4.0.0/test/unit/sourcefile_test.h:138: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).
	strncpy(a, "int = 1;\n", strlen("int = 1;\n"));

ANALYSIS SUMMARY:

Hits = 139
Lines analyzed = 10632 in approximately 0.38 seconds (28095 lines/second)
Physical Source Lines of Code (SLOC) = 7524
Hits@level = [0]  52 [1] 100 [2]  32 [3]   0 [4]   7 [5]   0
Hits@level+ = [0+] 191 [1+] 139 [2+]  39 [3+]   7 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 25.3854 [1+] 18.4742 [2+] 5.18341 [3+] 0.930356 [4+] 0.930356 [5+]   0
Symlinks skipped = 1 (--allowlink overrides but see doc for security issue)
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.