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/xfishtank-2.5/bubbles.h
Examining data/xfishtank-2.5/compact.h
Examining data/xfishtank-2.5/fishmaps/QueenAngel.h
Examining data/xfishtank-2.5/fishmaps/blueking.h
Examining data/xfishtank-2.5/fishmaps/blueking2.h
Examining data/xfishtank-2.5/fishmaps/butfish.h
Examining data/xfishtank-2.5/fishmaps/cichlid1.h
Examining data/xfishtank-2.5/fishmaps/cichlid4.h
Examining data/xfishtank-2.5/fishmaps/collaris.h
Examining data/xfishtank-2.5/fishmaps/discus2.h
Examining data/xfishtank-2.5/fishmaps/discus3.h
Examining data/xfishtank-2.5/fishmaps/eel.h
Examining data/xfishtank-2.5/fishmaps/f00.h
Examining data/xfishtank-2.5/fishmaps/f01.h
Examining data/xfishtank-2.5/fishmaps/f02.h
Examining data/xfishtank-2.5/fishmaps/f03.h
Examining data/xfishtank-2.5/fishmaps/f04.h
Examining data/xfishtank-2.5/fishmaps/f05.h
Examining data/xfishtank-2.5/fishmaps/f06.h
Examining data/xfishtank-2.5/fishmaps/f07.h
Examining data/xfishtank-2.5/fishmaps/f08.h
Examining data/xfishtank-2.5/fishmaps/f09.h
Examining data/xfishtank-2.5/fishmaps/f10.h
Examining data/xfishtank-2.5/fishmaps/f11.h
Examining data/xfishtank-2.5/fishmaps/f12.h
Examining data/xfishtank-2.5/fishmaps/f13.h
Examining data/xfishtank-2.5/fishmaps/manta.h
Examining data/xfishtank-2.5/fishmaps/newf1.h
Examining data/xfishtank-2.5/fishmaps/shark1.h
Examining data/xfishtank-2.5/fishmaps/six_barred.h
Examining data/xfishtank-2.5/fishmaps/teeth.h
Examining data/xfishtank-2.5/gofish/gofish.c
Examining data/xfishtank-2.5/makeh.c
Examining data/xfishtank-2.5/medcut.c
Examining data/xfishtank-2.5/medcut.h
Examining data/xfishtank-2.5/pcfshtofish/pcfshtofish.c
Examining data/xfishtank-2.5/ppmtofish/fishtoppm.c
Examining data/xfishtank-2.5/ppmtofish/ppmtofish.c
Examining data/xfishtank-2.5/rasttofish/rast.h
Examining data/xfishtank-2.5/rasttofish/rasttofish.c
Examining data/xfishtank-2.5/vroot.h
Examining data/xfishtank-2.5/xfish.c

FINAL RESULTS:

data/xfishtank-2.5/gofish/gofish.c:36:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(name1, "%s%03d.1", Head, FishCount);
data/xfishtank-2.5/gofish/gofish.c:37:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(name2, "%s%03d.2", Head, FishCount);
data/xfishtank-2.5/gofish/gofish.c:280: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(Head, argv[1]);
data/xfishtank-2.5/makeh.c:41:2:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	fscanf(fp, "%s\n", prefix);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:230:6:  [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(outname, DEFAULT_NAME);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:237:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfile, "%s.h", outname);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:44:2:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	fscanf(fp, "%s %s %d\n", junk, name, &val);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:66: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(filename, name);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:176: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(outname, argv[2]);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:179:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfile, "%s_1.ppm", outname);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:183:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfile, "%s_2.ppm", outname);
data/xfishtank-2.5/ppmtofish/ppmtofish.c:106:6:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	    fscanf(fp, "%s", line);
data/xfishtank-2.5/ppmtofish/ppmtofish.c:434:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfile, "%s.h", outname);
data/xfishtank-2.5/rasttofish/rasttofish.c:531:6:  [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(outname, DEFAULT_NAME);
data/xfishtank-2.5/rasttofish/rasttofish.c:538:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfile, "%s.h", outname);
data/xfishtank-2.5/xfish.c:1388: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(cname, p);
data/xfishtank-2.5/xfish.c:1390: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(picname, p);
data/xfishtank-2.5/vroot.h:97:23:  [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.
	const char *xss_id = getenv("XSCREENSAVER_WINDOW");
data/xfishtank-2.5/xfish.c:175:27:  [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.
    const char *display = getenv("DISPLAY");
data/xfishtank-2.5/xfish.c:185:17:  [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(argc, argv, "dDob:C:c:p:m:f:i:r:s")) != EOF) {
data/xfishtank-2.5/xfish.c:1784:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned) getpid());
data/xfishtank-2.5/bubbles.h:2: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 xbBits[9][8] = {
data/xfishtank-2.5/compact.h:3: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 magic[12];
data/xfishtank-2.5/gofish/gofish.c:13: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 Head[256];
data/xfishtank-2.5/gofish/gofish.c:32: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 name1[256];
data/xfishtank-2.5/gofish/gofish.c:33: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 name2[256];
data/xfishtank-2.5/gofish/gofish.c:40:10:  [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).
    fp = fopen(name1, "w");
data/xfishtank-2.5/gofish/gofish.c:69:10:  [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).
    fp = fopen(name2, "w");
data/xfishtank-2.5/gofish/gofish.c:282:2:  [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(Head, "fish");
data/xfishtank-2.5/makeh.c:22: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 prefix[BUFSIZ];
data/xfishtank-2.5/makeh.c:25:10:  [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).
    fp = fopen("FishList.local", "r");
data/xfishtank-2.5/makeh.c:27:7:  [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).
	fp = fopen("FishList", "r");
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:200: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 outfile[256];
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:205:8:  [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).
	ifp = fopen(argv[1], "r");
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:239:11:  [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).
    ofd = fopen(outfile, "w");
data/xfishtank-2.5/ppmtofish/fishtoppm.c:17: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).
    if ((fp = fopen(outfile, "w")) == NULL)
data/xfishtank-2.5/ppmtofish/fishtoppm.c:36: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 junk[80];
data/xfishtank-2.5/ppmtofish/fishtoppm.c:37: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[80];
data/xfishtank-2.5/ppmtofish/fishtoppm.c:145: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 outfile[256];
data/xfishtank-2.5/ppmtofish/fishtoppm.c:146: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 outname[80];
data/xfishtank-2.5/ppmtofish/fishtoppm.c:153:11:  [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).
    ifd = fopen(argv[1], "r");
data/xfishtank-2.5/ppmtofish/ppmtofish.c:10: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 magic[12];
data/xfishtank-2.5/ppmtofish/ppmtofish.c:95: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 line[1024];
data/xfishtank-2.5/ppmtofish/ppmtofish.c:175: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 pix_file[1024];
data/xfishtank-2.5/ppmtofish/ppmtofish.c:353: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 outfile[256];
data/xfishtank-2.5/ppmtofish/ppmtofish.c:362:11:  [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).
    ifd = fopen(argv[1], "r");
data/xfishtank-2.5/ppmtofish/ppmtofish.c:384:11:  [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).
    ifd = fopen(argv[2], "r");
data/xfishtank-2.5/ppmtofish/ppmtofish.c:436:11:  [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).
    ofd = fopen(outfile, "w");
data/xfishtank-2.5/rasttofish/rast.h:95:14:  [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 *map[3];
data/xfishtank-2.5/rasttofish/rasttofish.c:89: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 junk[30000];
data/xfishtank-2.5/rasttofish/rasttofish.c:484: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 outfile[256];
data/xfishtank-2.5/rasttofish/rasttofish.c:489:8:  [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).
	ifp = fopen(argv[1], "r");
data/xfishtank-2.5/rasttofish/rasttofish.c:540:11:  [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).
    ofd = fopen(outfile, "w");
data/xfishtank-2.5/xfish.c:104: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 picname[256];		/* name of the background picture file */
data/xfishtank-2.5/xfish.c:183:5:  [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(cname, "MediumAquamarine");
data/xfishtank-2.5/xfish.c:197: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).
	    blimit = atoi(optarg);
data/xfishtank-2.5/xfish.c:200: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).
	    climit = atoi(optarg);
data/xfishtank-2.5/xfish.c:203: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).
	    mlimit = atoi(optarg);
data/xfishtank-2.5/xfish.c:212: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).
	    flimit = atoi(optarg);
data/xfishtank-2.5/xfish.c:917:28:  [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.
	    MedianCount((unsigned char *) xfishRasterA[j],
data/xfishtank-2.5/xfish.c:1073:23:  [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.
	    data = (unsigned char *) malloc((rwidth[k] + 7) / 8 * rheight[k]);
data/xfishtank-2.5/xfish.c:1094:9:  [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, rwidth[k], rheight[k]);
data/xfishtank-2.5/xfish.c:1117:9:  [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, rwidth[k], rheight[k]);
data/xfishtank-2.5/xfish.c:1138:9:  [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, rwidth[k], rheight[k]);
data/xfishtank-2.5/xfish.c:1161:9:  [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, rwidth[k], rheight[k]);
data/xfishtank-2.5/xfish.c:1290:49:  [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.
	xbubbles[i] = XCreateBitmapFromData(Dpy, wid, (char *) xbBits[i], i, i);
data/xfishtank-2.5/xfish.c:1376:11:  [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).
	blimit = atoi(p);
data/xfishtank-2.5/xfish.c:1378:11:  [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).
	climit = atoi(p);
data/xfishtank-2.5/xfish.c:1380:11:  [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).
	mlimit = atoi(p);
data/xfishtank-2.5/xfish.c:1382: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).
	DoClipping = atoi(p);
data/xfishtank-2.5/xfish.c:1384:14:  [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).
	DoubleBuf = atoi(p);
data/xfishtank-2.5/xfish.c:1386:12:  [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).
	Overlap = atoi(p);
data/xfishtank-2.5/xfish.c:1392:11:  [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).
	flimit = atoi(p);
data/xfishtank-2.5/gofish/gofish.c:114:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	buff[i] = fgetc(stdin);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:20:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:24:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:26:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:28:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:30:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:47:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:69:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:76:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    val = fgetc(ifp);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:229:32:  [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).
	    outname = (char *) malloc(strlen(DEFAULT_NAME) + 1);
data/xfishtank-2.5/pcfshtofish/pcfshtofish.c:233:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(outname, argv[1], cnt);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:63:2:  [1] (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 character.
	strcpy(filename, "");
data/xfishtank-2.5/ppmtofish/fishtoppm.c:69:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:71:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:76:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:79:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:81:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:86:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:89:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:91:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:96:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:105:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:107:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:114:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:117:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:119:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/fishtoppm.c:124:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	val = fgetc(fp);
data/xfishtank-2.5/ppmtofish/ppmtofish.c:38:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	i = getc(fp);
data/xfishtank-2.5/ppmtofish/ppmtofish.c:103: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.
    if ((fscanf(fp, "%12s %d %d %d\n", line, w, h, &scale) == 4) &&
data/xfishtank-2.5/ppmtofish/ppmtofish.c:431:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(outname, argv[1], cnt);
data/xfishtank-2.5/rasttofish/rasttofish.c:41:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((c = getc(in)) == EOF)
data/xfishtank-2.5/rasttofish/rasttofish.c:44:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((c = getc(in)) == EOF)
data/xfishtank-2.5/rasttofish/rasttofish.c:47:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((c = getc(in)) == EOF)
data/xfishtank-2.5/rasttofish/rasttofish.c:50:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((c = getc(in)) == EOF)
data/xfishtank-2.5/rasttofish/rasttofish.c:530:32:  [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).
	    outname = (char *) malloc(strlen(DEFAULT_NAME) + 1);
data/xfishtank-2.5/rasttofish/rasttofish.c:534:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(outname, argv[1], cnt);
data/xfishtank-2.5/xfish.c:182:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sname, display, sizeof(sname) - 1);
data/xfishtank-2.5/xfish.c:206:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(cname, optarg, sizeof(cname) - 1);
data/xfishtank-2.5/xfish.c:209:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(picname, optarg, sizeof(picname) - 1);
data/xfishtank-2.5/xfish.c:242:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sname, argv[optind], sizeof(sname) - 1);
data/xfishtank-2.5/xfish.c:243:28:  [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).
	display = (char *) malloc(strlen(sname) + 9);

ANALYSIS SUMMARY:

Hits = 114
Lines analyzed = 27283 in approximately 2.87 seconds (9518 lines/second)
Physical Source Lines of Code (SLOC) = 26426
Hits@level = [0] 175 [1]  41 [2]  52 [3]   4 [4]  17 [5]   0
Hits@level+ = [0+] 289 [1+] 114 [2+]  73 [3+]  21 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 10.9362 [1+] 4.31393 [2+] 2.76243 [3+] 0.794672 [4+] 0.643306 [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.