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/catcodec-1.0.5/src/io.hpp
Examining data/catcodec-1.0.5/src/sample.hpp
Examining data/catcodec-1.0.5/src/stdafx.h
Examining data/catcodec-1.0.5/src/rev.hpp
Examining data/catcodec-1.0.5/src/io.cpp
Examining data/catcodec-1.0.5/src/sample.cpp
Examining data/catcodec-1.0.5/src/catcodec.cpp

FINAL RESULTS:

data/catcodec-1.0.5/src/io.cpp:146:6:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	if (vfprintf(this->file, format, ap) < 0) {
data/catcodec-1.0.5/src/catcodec.cpp:100: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 buffer[512] = "";
data/catcodec-1.0.5/src/catcodec.cpp:201: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 sfo_file[1024];
data/catcodec-1.0.5/src/catcodec.cpp:207:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(ext, ".sfo");
data/catcodec-1.0.5/src/io.cpp:28:15:  [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).
	this->file = fopen(filename.c_str(), binary ? "rb" : "r");
data/catcodec-1.0.5/src/io.cpp:98:15:  [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).
	this->file = fopen(filename_new.c_str(), binary ? "w+b" : "w+");
data/catcodec-1.0.5/src/sample.cpp:61: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 buffer[256];
data/catcodec-1.0.5/src/catcodec.cpp:123:26:  [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).
		char *newline = name + strlen(name) - 1;
data/catcodec-1.0.5/src/catcodec.cpp:129:7:  [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).
		if (strlen(filename) + 1 > 255) throw "Filename is too long in " + reader.GetFilename() + " at [" + buffer + "]";
data/catcodec-1.0.5/src/catcodec.cpp:130:7:  [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).
		if (strlen(name)     + 1 > 255) throw "Name is too long in " + reader.GetFilename() + " at [" + name + "]";
data/catcodec-1.0.5/src/catcodec.cpp:202:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(sfo_file, argv[2], sizeof(sfo_file));
data/catcodec-1.0.5/src/catcodec.cpp:204:22:  [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).
		if (ext == NULL || strlen(ext) != 4 || strcmp(ext, ".cat") != 0) {

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 1101 in approximately 0.06 seconds (18225 lines/second)
Physical Source Lines of Code (SLOC) = 527
Hits@level = [0]  12 [1]   5 [2]   6 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  24 [1+]  12 [2+]   7 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 45.5408 [1+] 22.7704 [2+] 13.2827 [3+] 1.89753 [4+] 1.89753 [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.