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/wikidiff2-1.10.0/DiffEngine.h
Examining data/wikidiff2-1.10.0/InlineDiff.cpp
Examining data/wikidiff2-1.10.0/InlineDiff.h
Examining data/wikidiff2-1.10.0/InlineDiffJSON.cpp
Examining data/wikidiff2-1.10.0/InlineDiffJSON.h
Examining data/wikidiff2-1.10.0/IntSet.h
Examining data/wikidiff2-1.10.0/JudyHS.h
Examining data/wikidiff2-1.10.0/TableDiff.cpp
Examining data/wikidiff2-1.10.0/TableDiff.h
Examining data/wikidiff2-1.10.0/TextUtil.cpp
Examining data/wikidiff2-1.10.0/TextUtil.h
Examining data/wikidiff2-1.10.0/Wikidiff2.cpp
Examining data/wikidiff2-1.10.0/Wikidiff2.h
Examining data/wikidiff2-1.10.0/Word.h
Examining data/wikidiff2-1.10.0/judy_test.cpp
Examining data/wikidiff2-1.10.0/php_cpp_allocator.h
Examining data/wikidiff2-1.10.0/php_wikidiff2.cpp
Examining data/wikidiff2-1.10.0/php_wikidiff2.h
Examining data/wikidiff2-1.10.0/wd2_allocator.h

FINAL RESULTS:

data/wikidiff2-1.10.0/DiffEngine.h:41:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(ch, sizeof(ch), fmt, ap);
data/wikidiff2-1.10.0/Wikidiff2.cpp:168:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		vsnprintf(ch, sizeof(ch), fmt, ap);
data/wikidiff2-1.10.0/DiffEngine.h:38: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 ch[2048];
data/wikidiff2-1.10.0/DiffEngine.h:43: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).
	if(!f) f = fopen("/tmp/wd2-debug-log.log", "a");
data/wikidiff2-1.10.0/InlineDiff.cpp:111: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 buf[256]; // should be plenty
data/wikidiff2-1.10.0/TableDiff.cpp:130: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 buf[256]; // should be plenty
data/wikidiff2-1.10.0/Wikidiff2.cpp:143: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 ch[2048];
data/wikidiff2-1.10.0/Wikidiff2.cpp:165: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 ch[2048];
data/wikidiff2-1.10.0/DiffEngine.h:45: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).
	fwrite(ch, 1, strlen(ch), f);
data/wikidiff2-1.10.0/Word.h:34:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			&& std::equal(bodyStart, bodyEnd, w.bodyStart);
data/wikidiff2-1.10.0/php_wikidiff2.cpp:198:70:  [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).
	COMPAT_RETURN_STRINGL( const_cast<char*>(WIKIDIFF2_VERSION_STRING), strlen(WIKIDIFF2_VERSION_STRING));

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 2916 in approximately 0.13 seconds (22978 lines/second)
Physical Source Lines of Code (SLOC) = 2178
Hits@level = [0]   3 [1]   3 [2]   6 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  14 [1+]  11 [2+]   8 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 6.42792 [1+] 5.05051 [2+] 3.67309 [3+] 0.918274 [4+] 0.918274 [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.