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/iraf-fitsutil-2018.07.06/lib/mef.h
Examining data/iraf-fitsutil-2018.07.06/src/checksum.c
Examining data/iraf-fitsutil-2018.07.06/src/dfits.h
Examining data/iraf-fitsutil-2018.07.06/src/kwdb.h
Examining data/iraf-fitsutil-2018.07.06/src/sum32.c
Examining data/iraf-fitsutil-2018.07.06/src/fgwrite.c
Examining data/iraf-fitsutil-2018.07.06/src/kwdb.c
Examining data/iraf-fitsutil-2018.07.06/src/fgread.c

FINAL RESULTS:

data/iraf-fitsutil-2018.07.06/src/fgread.c:356:3:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		chown (fh.name, fh.uid, fh.gid);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:507:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	    if ((n = readlink (fname, fh.linkname, NAMSIZ)) > 0)
data/iraf-fitsutil-2018.07.06/src/fgread.c:437: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 (type, s);
data/iraf-fitsutil-2018.07.06/src/fgread.c:445: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 (fh->name, s);
data/iraf-fitsutil-2018.07.06/src/fgread.c:447: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 (fh->name, s);
data/iraf-fitsutil-2018.07.06/src/fgread.c:448: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 (fh->linkname, p+4);
data/iraf-fitsutil-2018.07.06/src/fgread.c:648:6:  [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 (dirname, fname);
data/iraf-fitsutil-2018.07.06/src/fgread.c:649:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	    if (access (dirname, F_OK)) {
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:173:8:  [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(group, argv[++argno]);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:264: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(group, gname(card));
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:374:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (newpath, "%s%s", dname(path), dir);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:375: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 (newpath, dname(newpath));
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:470: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 (fh.name, path);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:471:2:  [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 (fh.name, fname);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:492: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 (sval, fname);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:509:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(sval, "%s -> %s",fname,fh.linkname);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:691: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 (fh.name, dname(fh.name));
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1463:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (slines+TOCLEN*(count-1), "  %-4d %4d %4d %s %c %s",
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1524:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	        sprintf (line, "  %-4d %4d%s", i, hoff, s+11);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:186: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 (sbuf+1, kwdbname);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:383: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 (oldval, value);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:412: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 (oldcom, comment);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:462: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 (oldtype, type);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:1142: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 (db->sbuf + db->sbufused, text);
data/iraf-fitsutil-2018.07.06/src/checksum.c:108: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	asc[32];
data/iraf-fitsutil-2018.07.06/src/fgread.c:81: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	name[NAMSIZ];
data/iraf-fitsutil-2018.07.06/src/fgread.c:92: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	linkname[NAMSIZ];
data/iraf-fitsutil-2018.07.06/src/fgread.c:145: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	*s, *ip, *p, type[20];
data/iraf-fitsutil-2018.07.06/src/fgread.c:146: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	ascii[161];
data/iraf-fitsutil-2018.07.06/src/fgread.c:242:9:  [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).
			in = open (*argp, O_RDONLY);
data/iraf-fitsutil-2018.07.06/src/fgread.c:392: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    smode[SLEN];
data/iraf-fitsutil-2018.07.06/src/fgread.c:395: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	record[FBLOCK*NBLOCK];
data/iraf-fitsutil-2018.07.06/src/fgread.c:440:17:  [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).
	fh->dirlevel = atoi(s);
data/iraf-fitsutil-2018.07.06/src/fgread.c:453:13:  [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).
	fh->size = atoi(s);
data/iraf-fitsutil-2018.07.06/src/fgread.c:508: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.
	static      char owner[SZ_OWNERSTR+1]={'\0'};
data/iraf-fitsutil-2018.07.06/src/fgread.c:548: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.
	static      char owner[SZ_OWNERSTR+1]={'\0'};
data/iraf-fitsutil-2018.07.06/src/fgread.c:632: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	*cp, *cwd, dirname[MAXLINELEN];
data/iraf-fitsutil-2018.07.06/src/fgread.c:687: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	card[CARDLEN];
data/iraf-fitsutil-2018.07.06/src/fgread.c:730: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 (card, "END");
data/iraf-fitsutil-2018.07.06/src/fgread.c:747: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[SZ_BUFFER], *p;
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:67: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	name[NAMSIZ];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:77: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	linkname[NAMSIZ];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:116: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	group[SLEN],*gname();
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:129: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.
	static	char	*def_flist[1] = {NULL};
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:132: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    card[SZ_PATHNAME];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:230:14:  [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).
			    out = open (argv[argno], O_RDWR|O_CREAT|O_TRUNC,
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:315:6:  [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 (card, "END");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:352: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	newpath[SZ_PATHNAME+1];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:353: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	oldpath[SZ_PATHNAME+1];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:354: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	fname[SZ_PATHNAME+1];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:423: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	card[CARDLEN], type[20];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:424: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	sval[SLEN];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:460:12:  [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 ((in = open (fname, 0, O_RDONLY)) == ERR) {
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:617:6:  [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 (type, "symlink");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:620:6:  [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 (type, "binary");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:623:6:  [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 (type, "text");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:626:6:  [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 (type, "directory");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:629:6:  [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 (type, "FITS");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:632:6:  [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 (type, "FITS-MEF");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:635:6:  [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 (type, "other");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:661: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(card,"%d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d",tm->tm_year+1900,
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:665: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(card,"%d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d",tm->tm_year+1900,
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:683:6:  [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 (card, "END");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:733: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.
	static      char owner[SZ_OWNERSTR+1];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:743: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(owner, "<unknown>");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:767: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.
	static      char owner[SZ_OWNERSTR+1];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:777: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(owner, "<unknown>");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:799: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	record[FBLOCK*NBLOCK];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:800: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	ascii[161];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:963: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	asc[32];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1045: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	c, *tp, line[CARDLEN];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1076: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	buf[FBLOCK*10], ascii[161];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1166:3:  [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(ascii,"%-10lu",sum32);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1188: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.
	static	char path[SZ_PATHNAME+1];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1255: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	*extn, buf[SZ_TESTBLOCK];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1309:11:  [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).
	    fd = open ((char *)fname, 0);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1345:12:  [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 (fname, 0)) <= 0) {;
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1378:16:  [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.
        static char s[32];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1379: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 (s, "%d", n);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1433: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	type[3], *tp, line[CARDLEN];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1438:6:  [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 (type, "fl");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1441:6:  [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 (type, "fb");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1444:6:  [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 (type, "ft");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1447:6:  [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 (type, "fd");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1450:6:  [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 (type, "ff");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1453:6:  [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 (type, "fm");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1456:6:  [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 (type, "??");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1495: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    *s, line[CARDLEN];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1583: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(slines+TOCLEN*(count-1),"  %-4d %4d %7.7c",count,
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1607: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 *sval, *spcount, kwname[8];
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1614:16:  [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).
	bytepix = abs(atoi(sval)) / BYTELEN;
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1615:10:  [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).
	naxes = atoi(kwdb_GetValue (kwdb, "NAXIS"));
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1618: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(kwname,"NAXIS%d",i);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1619: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).
	    npix *= atoi(kwdb_GetValue (kwdb, kwname));
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1626: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).
	    pcount = atoi(spcount);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:735:12:  [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 (filename, O_RDONLY)) < 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:773: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 keyword[9], value[80], type[2], comment[80];
data/iraf-fitsutil-2018.07.06/src/kwdb.c:775: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 card[80], *lop;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:793:7:  [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 (keyword, "END     ");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:899: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 card[256], tmpfile[512];
data/iraf-fitsutil-2018.07.06/src/kwdb.c:899:18:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	char card[256], tmpfile[512];
data/iraf-fitsutil-2018.07.06/src/kwdb.c:900: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 block[SZ_FILEBUF];
data/iraf-fitsutil-2018.07.06/src/kwdb.c:911:16:  [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 (filename, O_RDWR)) < 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:938:28:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		for (ip=filename, op=lop=tmpfile;  *ip;  ip++)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:944:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		if (!mkstemp(tmpfile)) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:944:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if (!mkstemp(tmpfile)) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:948:14:  [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 ((new = open (tmpfile, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:948:20:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if ((new = open (tmpfile, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:960:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			unlink (tmpfile);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:974:15:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if (rename (tmpfile, filename) < 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:978: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 (filename, O_RDWR)) < 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:987:16:  [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 (filename, O_CREAT|O_WRONLY, 0644)) < 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:1001: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 (card, "END");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:1024: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 card[256];
data/iraf-fitsutil-2018.07.06/src/sum32.c:41: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	name[SZ_PATHNAME], ascii[SZ_PATHNAME];
data/iraf-fitsutil-2018.07.06/src/sum32.c:118: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).
	} else if ((fp = fopen (name, "r")) != NULL) {
data/iraf-fitsutil-2018.07.06/src/sum32.c:123: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).
	    sum32 = atoi (name);
data/iraf-fitsutil-2018.07.06/src/sum32.c:167: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	record[BLOCK*RECORD];
data/iraf-fitsutil-2018.07.06/lib/mef.h:20:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
define	MEF_CGROUP       Memi[$1+6]		# Current group read
data/iraf-fitsutil-2018.07.06/src/fgread.c:490:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		recsize = read (in, record, FBLOCK*NBLOCK);
data/iraf-fitsutil-2018.07.06/src/fgread.c:494:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		recsize = read (in, record, (nbh % 10)*FBLOCK);
data/iraf-fitsutil-2018.07.06/src/fgread.c:534:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (owner, s, SZ_OWNERSTR);
data/iraf-fitsutil-2018.07.06/src/fgread.c:574:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (owner, s, SZ_OWNERSTR);
data/iraf-fitsutil-2018.07.06/src/fgread.c:647:6:  [1] (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 character.
	    strcat (dirname, "/");
data/iraf-fitsutil-2018.07.06/src/fgread.c:759:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    nbytes = read (in, buffer, SZ_BUFFER);
data/iraf-fitsutil-2018.07.06/src/fgread.c:774:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    nbytes = read (in, buffer, nbytes);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:472: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 (fh.linkname, "");
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:745:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (owner, pw->pw_name, SZ_OWNERSTR);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:779:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (owner, gp->gr_name, SZ_OWNERSTR);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:817:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    recsize = read (fd, record, FBLOCK*NBLOCK);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:821:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    recsize = read (fd, record, (nbh % 10)*FBLOCK);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1092:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	        nbytes = read (in, buf, FBLOCK*10);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1099:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nbytes = read (in, buf, (nbp % 10)*FBLOCK);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1108:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((nbytes = read (in, buf, FBLOCK*10)) != 0) {
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1142:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    nbytes = read (out, buf, FBLOCK*10);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1147:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    nbytes = read (out, buf, nbp);
data/iraf-fitsutil-2018.07.06/src/fgwrite.c:1311:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nchars = read (fd, buf, SZ_TESTBLOCK); 
data/iraf-fitsutil-2018.07.06/src/kwdb.c:153:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t (*read)();		/* private file read function */
data/iraf-fitsutil-2018.07.06/src/kwdb.c:187:17:  [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).
	db->sbufused = strlen(kwdbname) + 2;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:197:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	db->read = read;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:278:24:  [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).
	itp->vallen = value ? strlen(value) : 0;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:280:24:  [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).
	itp->typelen = type ? strlen(type) : 0;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:282: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).
	itp->comlen = comment ? strlen(comment) : 0;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:379:6:  [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(value) > itp->vallen) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:381: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).
	    itp->vallen = strlen (value);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:408:6:  [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(comment) > itp->comlen) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:410: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).
	    itp->comlen = strlen (comment);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:458:6:  [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(type) > itp->typelen) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:460:21:  [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).
	    itp->typelen = strlen (type);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:778:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    (!maxcards || ncards < maxcards) && db->read(fd,card,80)==80;
data/iraf-fitsutil-2018.07.06/src/kwdb.c:848:7:  [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 (type, "C");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:850:7:  [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 (type, "H");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:852:7:  [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 (type, "T");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:855:7:  [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 (type, "S");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:857:7:  [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 (type, "L");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:859:7:  [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 (type, "N");
data/iraf-fitsutil-2018.07.06/src/kwdb.c:917:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while (!lastone && read (fd, block, 2880) == 2880) {
data/iraf-fitsutil-2018.07.06/src/kwdb.c:965:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((nbytes = read (fd, block, SZ_FILEBUF)) > 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:993:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	kwdb_SetIO (kwdb, read, write);
data/iraf-fitsutil-2018.07.06/src/kwdb.c:1062:21:  [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 ((n = 20 - strlen(value)) > 0)
data/iraf-fitsutil-2018.07.06/src/kwdb.c:1131:11:  [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).
	nchars = strlen(text) + 1;
data/iraf-fitsutil-2018.07.06/src/sum32.c:51:12:  [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 (argv[iarg]);
data/iraf-fitsutil-2018.07.06/src/sum32.c:71:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy (ascii, argv[iarg], SZ_PATHNAME);
data/iraf-fitsutil-2018.07.06/src/sum32.c:83:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (name, argv[iarg], SZ_PATHNAME);
data/iraf-fitsutil-2018.07.06/src/sum32.c:97:13:  [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).
	    size = strlen (ascii);

ANALYSIS SUMMARY:

Hits = 165
Lines analyzed = 4291 in approximately 0.17 seconds (24932 lines/second)
Physical Source Lines of Code (SLOC) = 2957
Hits@level = [0]  55 [1]  47 [2]  94 [3]   0 [4]  22 [5]   2
Hits@level+ = [0+] 220 [1+] 165 [2+] 118 [3+]  24 [4+]  24 [5+]   2
Hits/KSLOC@level+ = [0+] 74.3997 [1+] 55.7998 [2+] 39.9053 [3+] 8.11633 [4+] 8.11633 [5+] 0.676361
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.