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/nyancat-1.5.2/src/animation.c
Examining data/nyancat-1.5.2/src/nyancat.c
Examining data/nyancat-1.5.2/src/telnet.h

FINAL RESULTS:

data/nyancat-1.5.2/src/nyancat.c:384:14:  [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 ((c = getopt_long(argc, argv, "eshiItnf:r:R:c:C:W:H:", long_opts, &index)) != -1) {
data/nyancat-1.5.2/src/nyancat.c:565:10:  [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.
		term = getenv("TERM");
data/nyancat-1.5.2/src/nyancat.c:97:7:  [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.
const char * colors[256] = {NULL};
data/nyancat-1.5.2/src/nyancat.c:260:10:  [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.
unsigned char telnet_options[256] = { 0 };
data/nyancat-1.5.2/src/nyancat.c:261:10:  [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.
unsigned char telnet_willack[256] = { 0 };
data/nyancat-1.5.2/src/nyancat.c:268:10:  [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.
unsigned char telnet_do_set[256]  = { 0 };
data/nyancat-1.5.2/src/nyancat.c:269:10:  [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.
unsigned char telnet_will_set[256]= { 0 };
data/nyancat-1.5.2/src/nyancat.c:356:11:  [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.
	unsigned char  sb[1024] = {0};
data/nyancat-1.5.2/src/nyancat.c:414:19:  [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).
				frame_count = atoi(optarg);
data/nyancat-1.5.2/src/nyancat.c:417:15:  [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).
				min_row = atoi(optarg);
data/nyancat-1.5.2/src/nyancat.c:420:15:  [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).
				max_row = atoi(optarg);
data/nyancat-1.5.2/src/nyancat.c:423:15:  [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).
				min_col = atoi(optarg);
data/nyancat-1.5.2/src/nyancat.c:426:15:  [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).
				max_col = atoi(optarg);
data/nyancat-1.5.2/src/nyancat.c:429:30:  [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).
				min_col = (FRAME_WIDTH - atoi(optarg)) / 2;
data/nyancat-1.5.2/src/nyancat.c:430:30:  [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).
				max_col = (FRAME_WIDTH + atoi(optarg)) / 2;
data/nyancat-1.5.2/src/nyancat.c:433:31:  [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).
				min_row = (FRAME_HEIGHT - atoi(optarg)) / 2;
data/nyancat-1.5.2/src/nyancat.c:434:31:  [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).
				max_row = (FRAME_HEIGHT + atoi(optarg)) / 2;
data/nyancat-1.5.2/src/nyancat.c:475:23:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				unsigned char i = getchar();
data/nyancat-1.5.2/src/nyancat.c:479:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					i = getchar();
data/nyancat-1.5.2/src/nyancat.c:508:14:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
							opt = getchar();
data/nyancat-1.5.2/src/nyancat.c:524:14:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
							opt = getchar();
data/nyancat-1.5.2/src/nyancat.c:579:19:  [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).
		for (k = 0; k < strlen(term); ++k) {
data/nyancat-1.5.2/src/nyancat.c:798:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(400000);
data/nyancat-1.5.2/src/nyancat.c:910:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(90000);

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 1813 in approximately 0.12 seconds (15732 lines/second)
Physical Source Lines of Code (SLOC) = 1477
Hits@level = [0]  33 [1]   7 [2]  15 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  57 [1+]  24 [2+]  17 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 38.5917 [1+] 16.2492 [2+] 11.5098 [3+] 1.3541 [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.