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/libfolia-2.4/src/folia_impl.cxx
Examining data/libfolia-2.4/src/folia_document.cxx
Examining data/libfolia-2.4/src/folia_utils.cxx
Examining data/libfolia-2.4/src/folia_types.cxx
Examining data/libfolia-2.4/src/folia_properties.cxx
Examining data/libfolia-2.4/src/folia_provenance.cxx
Examining data/libfolia-2.4/src/folia_engine.cxx
Examining data/libfolia-2.4/src/folialint.cxx
Examining data/libfolia-2.4/src/simpletest.cxx
Examining data/libfolia-2.4/include/libfolia/folia.h
Examining data/libfolia-2.4/include/libfolia/folia_impl.h
Examining data/libfolia-2.4/include/libfolia/folia_document.h
Examining data/libfolia-2.4/include/libfolia/folia_types.h
Examining data/libfolia-2.4/include/libfolia/folia_utils.h
Examining data/libfolia-2.4/include/libfolia/folia_properties.h
Examining data/libfolia-2.4/include/libfolia/folia_provenance.h
Examining data/libfolia-2.4/include/libfolia/folia_engine.h

FINAL RESULTS:

data/libfolia-2.4/src/folia_document.cxx:1383:23:  [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.
    const char *env = getenv( "FOLIA_TEXT_CHECK" );
data/libfolia-2.4/src/folia_provenance.cxx:131:23:  [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.
    const char *env = getenv( "USER" );
data/libfolia-2.4/src/folia_provenance.cxx:102: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 hostname[1024];
data/libfolia-2.4/src/folia_utils.cxx:380: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[100];
data/libfolia-2.4/src/folia_utils.cxx:406: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[100];
data/libfolia-2.4/src/folia_utils.cxx:607: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[256];

ANALYSIS SUMMARY:

Hits = 6
Lines analyzed = 19413 in approximately 0.49 seconds (39851 lines/second)
Physical Source Lines of Code (SLOC) = 14640
Hits@level = [0]   1 [1]   0 [2]   4 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]   7 [1+]   6 [2+]   6 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 0.478142 [1+] 0.409836 [2+] 0.409836 [3+] 0.136612 [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.