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/mklibs-0.1.44.1/src/mklibs-readelf/elf.cpp
Examining data/mklibs-0.1.44.1/src/mklibs-readelf/elf.hpp
Examining data/mklibs-0.1.44.1/src/mklibs-readelf/elf_data.hpp
Examining data/mklibs-0.1.44.1/src/mklibs-readelf/elf_defs.hpp
Examining data/mklibs-0.1.44.1/src/mklibs-readelf/elf_endian.hpp
Examining data/mklibs-0.1.44.1/src/mklibs-readelf/endian.hpp
Examining data/mklibs-0.1.44.1/src/mklibs-readelf/main.cpp

FINAL RESULTS:

data/mklibs-0.1.44.1/src/mklibs-readelf/main.cpp:200:15:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt_long (argc, argv, "einpRsu", long_opts, NULL)) != -1)
data/mklibs-0.1.44.1/src/mklibs-readelf/elf.cpp:39: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).
file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_error)
data/mklibs-0.1.44.1/src/mklibs-readelf/elf.cpp:45: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).
  if ((fd = ::open (filename, O_RDONLY)) == -1)
data/mklibs-0.1.44.1/src/mklibs-readelf/elf.hpp:62: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).
      static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error);
data/mklibs-0.1.44.1/src/mklibs-readelf/main.cpp:134:32:  [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).
  Elf::file *file = Elf::file::open (filename);

ANALYSIS SUMMARY:

Hits = 5
Lines analyzed = 1737 in approximately 0.05 seconds (32669 lines/second)
Physical Source Lines of Code (SLOC) = 1321
Hits@level = [0]   2 [1]   0 [2]   4 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]   7 [1+]   5 [2+]   5 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.29902 [1+] 3.78501 [2+] 3.78501 [3+] 0.757002 [4+]   0 [5+]   0
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.