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/aview-1.3.0rc1/image.c
Examining data/aview-1.3.0rc1/main.c
Examining data/aview-1.3.0rc1/shrink.c
Examining data/aview-1.3.0rc1/ui.c
Examining data/aview-1.3.0rc1/flip.c
Examining data/aview-1.3.0rc1/general.c
Examining data/aview-1.3.0rc1/fli.h
Examining data/aview-1.3.0rc1/general.h
Examining data/aview-1.3.0rc1/shrink.h
Examining data/aview-1.3.0rc1/ui.h
Examining data/aview-1.3.0rc1/image.h

FINAL RESULTS:

data/aview-1.3.0rc1/flip.c:665:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(string, "%i - %-40s", i, aa_fonts[i]->name);
data/aview-1.3.0rc1/flip.c:696:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(text,"%i %-20s:%-12s",i+1,texts[i],(SUPPORTED&masks[i])?((supported&masks[i])?"On":"Off"):"Unsupported");
data/aview-1.3.0rc1/flip.c:775:2:  [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( fli.filename, options.filename );
data/aview-1.3.0rc1/ui.c:59:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(string, "%c - %-40s", getletter(i), aa_fonts[i]->name);
data/aview-1.3.0rc1/ui.c:90:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(text, "%i %-20s:%-12s", i + 1, texts[i], (SUPPORTED & masks[i]) ? ((supported & masks[i]) ? "On" : "Off") : "Unsupported");
data/aview-1.3.0rc1/ui.c:111:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(string, "%c - %-40s", getletter(i), aa_formats[i]->formatname);
data/aview-1.3.0rc1/fli.h:31: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  			reserved1[38];	/*+ 38 bytes set to 0 */
data/aview-1.3.0rc1/fli.h:34: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                    reserved2[40];	/*  40 bytes set to 0 */
data/aview-1.3.0rc1/fli.h:43: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 			reserved[8];	/* set to 0 */
data/aview-1.3.0rc1/flip.c:20: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 filename[NAMELEN];	/* filename given on command line */
data/aview-1.3.0rc1/flip.c:40: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 filename[NAMELEN]; /* filename of fli file */
data/aview-1.3.0rc1/flip.c:190:5:  [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( index + x, data, type );
data/aview-1.3.0rc1/flip.c:237:5:  [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( index + index_x, data, type );
data/aview-1.3.0rc1/flip.c:272:6:  [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( graph_mem + index + index_x, (uchar *)data, -type );
data/aview-1.3.0rc1/flip.c:308:4:  [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( index, data, fli->h.width );
data/aview-1.3.0rc1/flip.c:374:32:  [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).
							options->playrep = abs( atoi( argv[i+k] ) );
data/aview-1.3.0rc1/flip.c:379:33:  [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).
						   	options->speed = abs( atoi( argv[i+k] ) );
data/aview-1.3.0rc1/flip.c:411: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).
		fli->f = fopen( fli->filename, "rb" );
data/aview-1.3.0rc1/flip.c:663: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 string[255];
data/aview-1.3.0rc1/flip.c:681: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 text[40];
data/aview-1.3.0rc1/image.c:14: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 data[65536];
data/aview-1.3.0rc1/image.c:30:19:  [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 ((file = fopen(name, "rb")) == NULL) {
data/aview-1.3.0rc1/main.c:8: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 filename[NAMELEN];
data/aview-1.3.0rc1/ui.c:57: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 string[255];
data/aview-1.3.0rc1/ui.c:74: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 text[40];
data/aview-1.3.0rc1/ui.c:108: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 string[255];
data/aview-1.3.0rc1/ui.c:109: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 name[256];
data/aview-1.3.0rc1/ui.c:118:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(string, "Page size is:%ix%i", data.format->pagewidth, data.format->pageheight);
data/aview-1.3.0rc1/ui.c:122:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(string, "%i", data.format->width);
data/aview-1.3.0rc1/ui.c:127:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(string, "%i", data.format->height);
data/aview-1.3.0rc1/ui.c:135:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat(name,"%c%e");
data/aview-1.3.0rc1/ui.c:181: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 string[255];
data/aview-1.3.0rc1/ui.c:408:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "gamma:%f", renderparams->gamma);
data/aview-1.3.0rc1/ui.c:414:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "gamma:%f", renderparams->gamma);
data/aview-1.3.0rc1/ui.c:420:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "bright:%f", renderparams->bright / 255.0);
data/aview-1.3.0rc1/ui.c:426:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "bright:%f", renderparams->bright / 255.0);
data/aview-1.3.0rc1/ui.c:432:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "bright:%f", renderparams->bright / 255.0);
data/aview-1.3.0rc1/ui.c:438:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "bright:%f", renderparams->bright / 255.0);
data/aview-1.3.0rc1/ui.c:444:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "contrast:%f", renderparams->contrast / 127.0);
data/aview-1.3.0rc1/ui.c:450:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(string, "contrast:%f", renderparams->contrast / 127.0);
data/aview-1.3.0rc1/flip.c:397:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy( options->filename, argv[i], NAMELEN );
data/aview-1.3.0rc1/flip.c:587:5:  [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(T);
data/aview-1.3.0rc1/flip.c:590: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(t % T);
data/aview-1.3.0rc1/flip.c:592:8:  [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.
		else usleep(t);
data/aview-1.3.0rc1/image.c:35:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (getc(file) != 'P') {
data/aview-1.3.0rc1/image.c:39:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(file);
data/aview-1.3.0rc1/image.c:47:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(file);
data/aview-1.3.0rc1/image.c:51:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getc(file);
data/aview-1.3.0rc1/image.c:71:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(file);
data/aview-1.3.0rc1/image.c:90:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    c=getc(file);
data/aview-1.3.0rc1/image.c:99:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  r=getc(file);
data/aview-1.3.0rc1/image.c:100:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  g=getc(file);
data/aview-1.3.0rc1/image.c:101:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  b=getc(file);
data/aview-1.3.0rc1/main.c:37:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filename, argv[i], NAMELEN);

ANALYSIS SUMMARY:

Hits = 54
Lines analyzed = 1812 in approximately 0.07 seconds (25399 lines/second)
Physical Source Lines of Code (SLOC) = 1630
Hits@level = [0]  34 [1]  14 [2]  34 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+]  88 [1+]  54 [2+]  40 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 53.9877 [1+] 33.1288 [2+] 24.5399 [3+] 3.68098 [4+] 3.68098 [5+]   0
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.