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/kiwix-tools-3.1.2/src/manager/kiwix-manage.cpp
Examining data/kiwix-tools-3.1.2/src/reader/kiwix-read.cpp
Examining data/kiwix-tools-3.1.2/src/searcher/kiwix-search.cpp
Examining data/kiwix-tools-3.1.2/src/server/kiwix-serve.cpp
Examining data/kiwix-tools-3.1.2/src/version.h

FINAL RESULTS:

data/kiwix-tools-3.1.2/src/server/kiwix-serve.cpp:293:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
      if (access(procPath.c_str(), F_OK) != -1) {
data/kiwix-tools-3.1.2/src/manager/kiwix-manage.cpp:141:9:  [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.
    c = getopt_long(argc, argv, "cz:u:", long_options, &option_index);
data/kiwix-tools-3.1.2/src/manager/kiwix-manage.cpp:227:9:  [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.
    c = getopt_long(argc, argv, "v", long_options, &option_index);
data/kiwix-tools-3.1.2/src/reader/kiwix-read.cpp:52:11:  [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.
      c = getopt_long(argc, argv, "Vvs:", long_options, &option_index);
data/kiwix-tools-3.1.2/src/searcher/kiwix-search.cpp:63:11:  [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.
      c = getopt_long(argc, argv, "Vvsb:", long_options, &option_index);
data/kiwix-tools-3.1.2/src/server/kiwix-serve.cpp:123:11:  [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.
        = getopt_long(argc, argv, "zmnbdvVla:p:f:t:r:i:", long_options, &option_index);
data/kiwix-tools-3.1.2/src/server/kiwix-serve.cpp:154:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          serverPort = atoi(optarg);
data/kiwix-tools-3.1.2/src/server/kiwix-serve.cpp:158:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          PPID = atoi(optarg);
data/kiwix-tools-3.1.2/src/server/kiwix-serve.cpp:164:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          nb_threads = atoi(optarg);

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 867 in approximately 0.14 seconds (6071 lines/second)
Physical Source Lines of Code (SLOC) = 642
Hits@level = [0]   0 [1]   0 [2]   3 [3]   5 [4]   1 [5]   0
Hits@level+ = [0+]   9 [1+]   9 [2+]   9 [3+]   6 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 14.0187 [1+] 14.0187 [2+] 14.0187 [3+] 9.34579 [4+] 1.55763 [5+]   0
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.