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/figlet-2.2.5/crc.h
Examining data/figlet-2.2.5/zipio.c
Examining data/figlet-2.2.5/chkfont.c
Examining data/figlet-2.2.5/zipio.h
Examining data/figlet-2.2.5/crc.c
Examining data/figlet-2.2.5/inflate.h
Examining data/figlet-2.2.5/figlet.c
Examining data/figlet-2.2.5/utf8.c
Examining data/figlet-2.2.5/utf8.h
Examining data/figlet-2.2.5/inflate.c
Examining data/figlet-2.2.5/getopt.c

FINAL RESULTS:

data/figlet-2.2.5/chkfont.c:86:3:  [4] (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).
  strcpy(ucsuffix,suffix);
data/figlet-2.2.5/figlet.c:148:21:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
#define STRCPY(x,y) wcscpy((x),(y))
data/figlet-2.2.5/figlet.c:149:21:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
#define STRCAT(x,y) wcscat((x),(y))
data/figlet-2.2.5/figlet.c:154:21:  [4] (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).
#define STRCPY(x,y) strcpy((x),(y))
data/figlet-2.2.5/figlet.c:155:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
#define STRCAT(x,y) strcat((x),(y))
data/figlet-2.2.5/figlet.c:710:5:  [4] (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).
    strcpy(fontpath,fontdirname);
data/figlet-2.2.5/figlet.c:713:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fontpath,name);
data/figlet-2.2.5/figlet.c:714:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(fontpath,suffix);
data/figlet-2.2.5/figlet.c:718:3:  [4] (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).
  strcpy(fontpath,name);
data/figlet-2.2.5/figlet.c:719:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(fontpath,suffix);
data/figlet-2.2.5/figlet.c:1151:5:  [4] (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).
    strcpy(outline,templine);
data/figlet-2.2.5/figlet.c:927:9:  [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.
  env = getenv("FIGLET_FONTDIR");
data/figlet-2.2.5/figlet.c:946:15:  [3] (buffer) getopt:
  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(Myargc,Myargv,"ADEXLRI:xlcrpntvm:w:d:f:C:NFskSWo"))!= -1) {
data/figlet-2.2.5/getopt.c:53:5:  [3] (buffer) getopt:
  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.
int getopt(int argc, char *argv[], char *opts)
data/figlet-2.2.5/chkfont.c:28: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 posshardblanks[9] = { '!', '@', '#', '$', '%', '&', '*', 0x7f, 0 };
data/figlet-2.2.5/chkfont.c:83: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 ucsuffix[10];
data/figlet-2.2.5/chkfont.c:217: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 magicnum[5],cha;
data/figlet-2.2.5/chkfont.c:232:12:  [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).
  fontfile=fopen(fontfilename,"r");
data/figlet-2.2.5/figlet.c:263:13:  [2] (misc) open:
  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 ((fd = open("/dev/tty",O_WRONLY))<0) return -1;
data/figlet-2.2.5/figlet.c:1020:21:  [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).
        infoprint = atoi(optarg);
data/figlet-2.2.5/figlet.c:1023:21:  [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).
        smushmode = atoi(optarg);
data/figlet-2.2.5/figlet.c:1034: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).
        columns = atoi(optarg);
data/figlet-2.2.5/figlet.c:1134: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 templine[MAXLEN+1];
data/figlet-2.2.5/figlet.c:1185: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 fileline[MAXLEN+1],magicnum[5];
data/figlet-2.2.5/figlet.c:1549: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 c[10];
data/figlet-2.2.5/figlet.c:1552:3:  [2] (buffer) wchar_t:
  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.
  wchar_t wc[2];
data/figlet-2.2.5/getopt.c:40: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 errbuf[2];\
data/figlet-2.2.5/inflate.c:141:12:  [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  buffer[BUFFERSIZE];         /* input buffer data          */
data/figlet-2.2.5/inflate.c:152:12:  [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  window[WINDOWSIZE];         /* output window data         */
data/figlet-2.2.5/inflate.c:799:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(is->window + w, is->window + d, e);
data/figlet-2.2.5/zipio.c:233:12:  [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  inpbuf[INPBUFSIZE];         /* inp buffer from zip file   */
data/figlet-2.2.5/zipio.c:234:12:  [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 *ptrbuf[PTRBUFSIZE];         /* pointers to in-memory bufs */
data/figlet-2.2.5/zipio.c:236:12:  [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  getbuf[OUTBUFSIZE];         /* buffer for use by Zgetc    */
data/figlet-2.2.5/zipio.c:304:20:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
      zs->tmpfil = tmpfile();
data/figlet-2.2.5/zipio.c:409:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tmpbuf, ptr, len);
data/figlet-2.2.5/zipio.c:481:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr, tmpbuf, len);
data/figlet-2.2.5/zipio.c:588:18:  [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).
  zs->OpenFile = fopen(path, mode);
data/figlet-2.2.5/chkfont.c:91: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(path)<strlen(suffix)) return 1;
data/figlet-2.2.5/chkfont.c:91:20:  [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(path)<strlen(suffix)) return 1;
data/figlet-2.2.5/chkfont.c:92:14:  [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).
  s = path + strlen(path) - strlen(suffix);
data/figlet-2.2.5/chkfont.c:92:29:  [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).
  s = path + strlen(path) - strlen(suffix);
data/figlet-2.2.5/chkfont.c:131: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).
  len=strlen(fileline)-1;
data/figlet-2.2.5/chkfont.c:146:10:  [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).
  newlen=strlen(fileline);
data/figlet-2.2.5/chkfont.c:247:10:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
numsread=fscanf(fontfile,"%4s",magicnum);
data/figlet-2.2.5/chkfont.c:258:5:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
cha=getc(fontfile);
data/figlet-2.2.5/chkfont.c:268:5:  [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(fileline)>0 ? fileline[strlen(fileline)-1]!='\n' : 0) {
data/figlet-2.2.5/chkfont.c:268:35:  [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(fileline)>0 ? fileline[strlen(fileline)-1]!='\n' : 0) {
data/figlet-2.2.5/chkfont.c:269:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while(k=getc(fontfile),k!='\n'&&k!=EOF) ; /* Advance to end of line */
data/figlet-2.2.5/chkfont.c:360:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while(k=getc(fontfile),k!='\n'&&k!=EOF) ; /* Advance to end of line */
data/figlet-2.2.5/chkfont.c:374: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).
  len=strlen(fileline)-1;
data/figlet-2.2.5/figlet.c:82:27:  [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).
#define MYSTRLEN(x) ((int)strlen(x)) /* Eliminate ANSI problem */
data/figlet-2.2.5/figlet.c:147:19:  [1] (buffer) wcslen:
  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).
#define STRLEN(x) wcslen(x)
data/figlet-2.2.5/figlet.c:1702:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return( getchar() );	/* no: return stdin character */
data/figlet-2.2.5/getopt.c:42:48:  [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).
    (void) write(2, strlwr(argv[0]), (unsigned)strlen(argv[0]));\
data/figlet-2.2.5/getopt.c:43:34:  [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).
    (void) write(2, s, (unsigned)strlen(s));\

ANALYSIS SUMMARY:

Hits = 55
Lines analyzed = 5595 in approximately 0.19 seconds (29667 lines/second)
Physical Source Lines of Code (SLOC) = 3611
Hits@level = [0] 110 [1]  18 [2]  23 [3]   3 [4]  11 [5]   0
Hits@level+ = [0+] 165 [1+]  55 [2+]  37 [3+]  14 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 45.6937 [1+] 15.2312 [2+] 10.2465 [3+] 3.87704 [4+] 3.04625 [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.