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/uchardet-0.0.7/build-mac/uchardet.cpp
Examining data/uchardet-0.0.7/script/header-template.cpp
Examining data/uchardet-0.0.7/src/CharDistribution.cpp
Examining data/uchardet-0.0.7/src/CharDistribution.h
Examining data/uchardet-0.0.7/src/JpCntx.cpp
Examining data/uchardet-0.0.7/src/JpCntx.h
Examining data/uchardet-0.0.7/src/LangModels/LangArabicModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangBulgarianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangCroatianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangCzechModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangDanishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangEsperantoModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangEstonianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangFinnishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangFrenchModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangGermanModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangGreekModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangHebrewModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangHungarianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangIrishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangItalianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangLatvianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangLithuanianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangMalteseModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangPolishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangPortugueseModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangRomanianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangRussianModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangSlovakModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangSloveneModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangSpanishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangSwedishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangThaiModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangTurkishModel.cpp
Examining data/uchardet-0.0.7/src/LangModels/LangVietnameseModel.cpp
Examining data/uchardet-0.0.7/src/nsBig5Prober.cpp
Examining data/uchardet-0.0.7/src/nsBig5Prober.h
Examining data/uchardet-0.0.7/src/nsCharSetProber.cpp
Examining data/uchardet-0.0.7/src/nsCharSetProber.h
Examining data/uchardet-0.0.7/src/nsCodingStateMachine.h
Examining data/uchardet-0.0.7/src/nsEUCJPProber.cpp
Examining data/uchardet-0.0.7/src/nsEUCJPProber.h
Examining data/uchardet-0.0.7/src/nsEUCKRProber.cpp
Examining data/uchardet-0.0.7/src/nsEUCKRProber.h
Examining data/uchardet-0.0.7/src/nsEUCTWProber.cpp
Examining data/uchardet-0.0.7/src/nsEUCTWProber.h
Examining data/uchardet-0.0.7/src/nsEscCharsetProber.cpp
Examining data/uchardet-0.0.7/src/nsEscCharsetProber.h
Examining data/uchardet-0.0.7/src/nsEscSM.cpp
Examining data/uchardet-0.0.7/src/nsGB2312Prober.cpp
Examining data/uchardet-0.0.7/src/nsGB2312Prober.h
Examining data/uchardet-0.0.7/src/nsHebrewProber.cpp
Examining data/uchardet-0.0.7/src/nsHebrewProber.h
Examining data/uchardet-0.0.7/src/nsLatin1Prober.cpp
Examining data/uchardet-0.0.7/src/nsLatin1Prober.h
Examining data/uchardet-0.0.7/src/nsMBCSGroupProber.cpp
Examining data/uchardet-0.0.7/src/nsMBCSGroupProber.h
Examining data/uchardet-0.0.7/src/nsMBCSSM.cpp
Examining data/uchardet-0.0.7/src/nsPkgInt.h
Examining data/uchardet-0.0.7/src/nsSBCSGroupProber.cpp
Examining data/uchardet-0.0.7/src/nsSBCSGroupProber.h
Examining data/uchardet-0.0.7/src/nsSBCharSetProber.cpp
Examining data/uchardet-0.0.7/src/nsSBCharSetProber.h
Examining data/uchardet-0.0.7/src/nsSJISProber.cpp
Examining data/uchardet-0.0.7/src/nsSJISProber.h
Examining data/uchardet-0.0.7/src/nsUTF8Prober.cpp
Examining data/uchardet-0.0.7/src/nsUTF8Prober.h
Examining data/uchardet-0.0.7/src/nsUniversalDetector.cpp
Examining data/uchardet-0.0.7/src/nsUniversalDetector.h
Examining data/uchardet-0.0.7/src/nscore.h
Examining data/uchardet-0.0.7/src/prmem.h
Examining data/uchardet-0.0.7/src/tools/uchardet.cpp
Examining data/uchardet-0.0.7/src/uchardet.cpp
Examining data/uchardet-0.0.7/src/uchardet.h
Examining data/uchardet-0.0.7/test/uchardet-tests.c

FINAL RESULTS:

data/uchardet-0.0.7/src/tools/uchardet.cpp:112:17:  [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((oc = getopt_long(argc, argv, "vh", longopts, NULL)) != -1)
data/uchardet-0.0.7/src/nsBig5Prober.h:67: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 mLastChar[2];
data/uchardet-0.0.7/src/nsEUCJPProber.h:72: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 mLastChar[2];
data/uchardet-0.0.7/src/nsEUCKRProber.h:73: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 mLastChar[2];
data/uchardet-0.0.7/src/nsEUCTWProber.h:67: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 mLastChar[2];
data/uchardet-0.0.7/src/nsGB2312Prober.h:69: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 mLastChar[2];
data/uchardet-0.0.7/src/nsSJISProber.h:73: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 mLastChar[2];
data/uchardet-0.0.7/src/tools/uchardet.cpp:51:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char buffer[BUFFER_SIZE];
data/uchardet-0.0.7/src/tools/uchardet.cpp:146:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        f = fopen(filename, "r");
data/uchardet-0.0.7/test/uchardet-tests.c:52:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        buffer[BUFFER_SIZE];
data/uchardet-0.0.7/test/uchardet-tests.c:98:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(filename, "r");

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 12919 in approximately 0.80 seconds (16149 lines/second)
Physical Source Lines of Code (SLOC) = 7841
Hits@level = [0]  32 [1]   0 [2]  10 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  43 [1+]  11 [2+]  11 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.48399 [1+] 1.40288 [2+] 1.40288 [3+] 0.127535 [4+]   0 [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.