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/afio-2.5.2/afio.c
Examining data/afio-2.5.2/afio.h
Examining data/afio-2.5.2/compfile.c
Examining data/afio-2.5.2/exten.c
Examining data/afio-2.5.2/exten_default.h
Examining data/afio-2.5.2/match.c
Examining data/afio-2.5.2/patchlevel.h
Examining data/afio-2.5.2/regtest/cmpstat.c
Examining data/afio-2.5.2/regtest/makesparse.c
Examining data/afio-2.5.2/regtest/statsize.c

FINAL RESULTS:

data/afio-2.5.2/afio.c:1033:10:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    VOID chown (name,
data/afio-2.5.2/afio.c:1037:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    VOID chmod (name, asb->sb_mode & S_IPERM);
data/afio-2.5.2/afio.c:3013:24:  [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 ((asb->sb_size = readlink (local,
data/afio-2.5.2/afio.c:3110:14:  [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.
             readlink (local, asb->sb_link, sizeof (asb->sb_link) - 1)) < 0)
data/afio-2.5.2/afio.c:3377:27:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    if (perm != operm && chmod (name, perm) < 0)
data/afio-2.5.2/afio.c:3397:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	      chown (name, asb->sb_uid, asb->sb_gid) < 0)
data/afio-2.5.2/afio.c:3399:30:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	  else if (perm != operm && chmod (name, perm) < 0)
data/afio-2.5.2/afio.c:3416:23:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (perm != operm && chmod (name, perm) < 0)
data/afio-2.5.2/afio.c:3430:23:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (perm != operm && chmod (name, perm) < 0)
data/afio-2.5.2/afio.c:3451:17:  [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 ((ssize = readlink (name, sname, sizeof (sname))) < 0)
data/afio-2.5.2/afio.c:3539:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	  if (chown (name, (uid == 0 ? asb->sb_uid : uid),
data/afio-2.5.2/afio.c:3544:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	      if(chmod (name, perm) < 0)
data/afio-2.5.2/afio.c:712:16:  [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).
      arname = strcpy (arspec, av[optind++]);
data/afio-2.5.2/afio.c:722:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  VOID sprintf (arname = remote,
data/afio-2.5.2/afio.c:832:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(exitmsg,"The operation HAD %d WARNING%s ABOUT ERRORS.",warnings,warnings==1?"":"S");
data/afio-2.5.2/afio.c:912:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd,"sendmail %s",who);
data/afio-2.5.2/afio.c:913:7:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	fp = popen(cmd,"w");
data/afio-2.5.2/afio.c:1010: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).
  VOID strcpy (local, *last ? last : ".");
data/afio-2.5.2/afio.c:1015: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).
  VOID strcpy (pwd, dir);
data/afio-2.5.2/afio.c:1307: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(local, name);
data/afio-2.5.2/afio.c:1371:7:  [4] (buffer) sscanf:
  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. If the scanf format is influenceable by an
  attacker, it's exploitable.
  if (sscanf (header, PH_SCAN, &pasb.PSt_dev,
data/afio-2.5.2/afio.c:1417:7:  [4] (buffer) sscanf:
  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. If the scanf format is influenceable by an
  attacker, it's exploitable.
  if (sscanf (header, PH_SCAN2, &pasb.PSt_dev,
data/afio-2.5.2/afio.c:1468:7:  [4] (buffer) sscanf:
  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. If the scanf format is influenceable by an
  attacker, it's exploitable.
  if (sscanf (header, PH_SCAN3, &pasb.PSt_dev,
data/afio-2.5.2/afio.c:1659:6:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	    execvp (compressprog, compress_arg_list);
data/afio-2.5.2/afio.c:1661:6:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	    execlp (compressprog, compressprog, "-d", "-c", NULL);
data/afio-2.5.2/afio.c:2546:10:  [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).
    VOID strcpy (mem, str);
data/afio-2.5.2/afio.c:2574:12:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      VOID execl ("/bin/mkdir", "mkdir", name, (char *) NULL);
data/afio-2.5.2/afio.c:2657:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  VOID sprintf (msg, "\
data/afio-2.5.2/afio.c:2667:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  VOID sprintf (msg, "\
data/afio-2.5.2/afio.c:2685:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		  if (system (formatcmd) != 0)
data/afio-2.5.2/afio.c:2688:9:  [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(msg,myname);
data/afio-2.5.2/afio.c:2748:7:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      execlp(promptscript,promptscript,vol,arspec,why,(char *)NULL);
data/afio-2.5.2/afio.c:2912:4:  [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(name,firstfilename);
data/afio-2.5.2/afio.c:2924:4:  [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(local,&name[4]);
data/afio-2.5.2/afio.c:2936:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(name,"%s/%s",CONTROLNAME,label);
data/afio-2.5.2/afio.c:2979:9:  [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).
	  VOID strcpy (local, name);
data/afio-2.5.2/afio.c:2983:18:  [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).
      if(fsname) strcpy(fsname,local); /* for use by utime() in -a option */
data/afio-2.5.2/afio.c:3081:7:  [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(uncompto, name);
data/afio-2.5.2/afio.c:3089:10:  [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).
    VOID strcpy (local, name);
data/afio-2.5.2/afio.c:3107:7:  [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(archlink,asb->sb_link);
data/afio-2.5.2/afio.c:3234:9:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execlp (controlscript, controlscript, label, NULL);
data/afio-2.5.2/afio.c:3501:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		      execvp (compressprog, compress_arg_list);
data/afio-2.5.2/afio.c:3503:9:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		      execlp (compressprog, compressprog, "-d", "-c", NULL);
data/afio-2.5.2/afio.c:3515:9:  [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 (uncompto, name);
data/afio-2.5.2/afio.c:4103: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).
  VOID strcpy (header, M_ASCII);
data/afio-2.5.2/afio.c:4104:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  VOID sprintf (header + M_STRLEN, H_PRINT, 0, 0,
data/afio-2.5.2/afio.c:4167: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).
  VOID strcpy (header, M_ASCII);
data/afio-2.5.2/afio.c:4168:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  VOID sprintf (header + M_STRLEN, H_PRINT, ush (asb->sb_dev),
data/afio-2.5.2/afio.c:4201: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).
  VOID strcpy (header, M_ASCII2);
data/afio-2.5.2/afio.c:4202:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  VOID sprintf (header + M_STRLEN, H_PRINT2, ush (asb->sb_dev),
data/afio-2.5.2/afio.c:4235: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).
  VOID strcpy (header, M_ASCII3);
data/afio-2.5.2/afio.c:4237:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  VOID sprintf (header + M_STRLEN, H_PRINT3, ulo (asb->sb_dev),
data/afio-2.5.2/afio.c:4417:20:  [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).
      if (nameopt (strcat (strcat (strcpy (to, *dir++), "/"), from)) < 0)
data/afio-2.5.2/afio.c:4417:36:  [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).
      if (nameopt (strcat (strcat (strcpy (to, *dir++), "/"), from)) < 0)
data/afio-2.5.2/afio.c:4453: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(dptr,sptr);
data/afio-2.5.2/afio.c:4532:8:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  VOID execvp (arg[0], arg);
data/afio-2.5.2/afio.c:4631:12:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      VOID execl ("/bin/rmdir", "rmdir", name, (char *) NULL);
data/afio-2.5.2/afio.c:5124:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    VOID sprintf (why, "Killed by signal %d%s",
data/afio-2.5.2/afio.c:5223:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    VOID sprintf (msg, "\
data/afio-2.5.2/afio.c:5244:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	      if (system (formatcmd) != 0)
data/afio-2.5.2/afio.c:5456:14:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
extern char *mktemp ();
data/afio-2.5.2/afio.c:5457:14:  [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).
extern char *strcat ();
data/afio-2.5.2/afio.c:5458:14:  [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).
extern char *strcpy ();
data/afio-2.5.2/afio.c:5486:7:  [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 (tmpdir, R_OK + W_OK + X_OK) < 0)
data/afio-2.5.2/afio.c:5498:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy (buf, tmpdir);
data/afio-2.5.2/afio.c:5500:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat (buf, name);
data/afio-2.5.2/afio.c:5504:11:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
  return (mktemp (buf));
data/afio-2.5.2/compfile.c:196:8:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	      execlp (compressprog, compressprog, "-c", farg, NULL);
data/afio-2.5.2/compfile.c:198:8:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	      execvp (compressprog, compress_arg_list);
data/afio-2.5.2/match.c:183:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(namec,name);
data/afio-2.5.2/regtest/cmpstat.c:28:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf,"ls -ld \"%s\" \"%s\"",av[1],av[2]);
data/afio-2.5.2/regtest/cmpstat.c:29:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  system(buf);
data/afio-2.5.2/afio.c:4504:14:  [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.
  if ((*av = getenv ("SHELL")) && **av)
data/afio-2.5.2/afio.c:5459:14:  [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.
extern char *getenv ();
data/afio-2.5.2/afio.c:5462:1:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
tempnam (dir, name)
data/afio-2.5.2/afio.c:5473:17:  [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.
  if ((tmpdir = getenv ("TMPDIR")) == (char *) NULL)
data/afio-2.5.2/afio.c:5481:21:  [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.
      if ((tmpdir = getenv ("TMPDIR")) == (char *) NULL)
data/afio-2.5.2/afio.c:274:13:  [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 arspec[PATHSIZE];	/* Specified archive name */
data/afio-2.5.2/afio.c:275:13:  [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 proc_arname[PATHSIZE+10];/* %-processed archive name */
data/afio-2.5.2/afio.c:290:22:  [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 unsigned char ino16bitused[256*256/8];  /* bitmap of 16 bit inode numbers */
data/afio-2.5.2/afio.c:298:13:  [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 pwd[PATHSIZE];	/* Working directory (with "-g") */
data/afio-2.5.2/afio.c:306:6:  [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 uncompto[PATHSIZE];	/* name we uncompressed to */
data/afio-2.5.2/afio.c:323:13:  [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 firstfilename[PATHSIZE]=""; /* for temp storage during -o */
data/afio-2.5.2/afio.c:336:8:  [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.
  auto char remote[PATHSIZE];
data/afio-2.5.2/afio.c:500: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 ((logfile = fopen (optarg, "a")) == (FILE *) 0)
data/afio-2.5.2/afio.c:909: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 cmd[1024];
data/afio-2.5.2/afio.c:910: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 hostname[256];
data/afio-2.5.2/afio.c:1002:8:  [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.
  auto char dir[PATHSIZE];
data/afio-2.5.2/afio.c:1231:8:  [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.
  auto char name[PATHSIZE];
data/afio-2.5.2/afio.c:1287:8:  [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.
  auto char name[PATHSIZE];
data/afio-2.5.2/afio.c:1288:8:  [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.
  auto char local[PATHSIZE];
data/afio-2.5.2/afio.c:1361:8:  [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.
  auto char header[H_STRLEN + 1];
data/afio-2.5.2/afio.c:1409:8:  [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.
  auto char header[H_STRLEN2 + 1];
data/afio-2.5.2/afio.c:1458:8:  [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.
  auto char header[H_STRLEN3 + 1];
data/afio-2.5.2/afio.c:1535:3:  [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 ((char *) &binary,
data/afio-2.5.2/afio.c:1669:4:  [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 buff1[40960];
data/afio-2.5.2/afio.c:1670:4:  [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 buff2[40960];
data/afio-2.5.2/afio.c:1726: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 buff1[40960];
data/afio-2.5.2/afio.c:1822:23:  [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).
      else if ((ifd = open (linkp->l_path->p_name, O_RDONLY)) < 0)
data/afio-2.5.2/afio.c:2042:8:  [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.
  auto char magic[M_STRLEN];
data/afio-2.5.2/afio.c:2183:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (dst, bufidx, have);
data/afio-2.5.2/afio.c:2235:3:  [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 ((char *) &binary,
data/afio-2.5.2/afio.c:2503:1:  [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 (to, from, len)
data/afio-2.5.2/afio.c:2570: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).
      VOID open ("/dev/null", O_RDWR);
data/afio-2.5.2/afio.c:2620:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char answer[20];
data/afio-2.5.2/afio.c:2689:9:  [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(msg,": Format failed! Try again (y/n)? > ");
data/afio-2.5.2/afio.c:2723:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char vol[100];
data/afio-2.5.2/afio.c:2733: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(vol,"%d",arvolume);
data/afio-2.5.2/afio.c:2741: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 ((open (TTY, O_RDWR)) < 0)
data/afio-2.5.2/afio.c:2743: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).
	  VOID open ("/dev/null", O_RDWR);
data/afio-2.5.2/afio.c:2858:18:  [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).
	  oops = ((fd = open (proc_arname, O_RDWR | O_CTSPECIAL)) < 0
data/afio-2.5.2/afio.c:2869: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).
        arfd = open (proc_arname, mode | O_CREAT | O_TRUNC | O_SYNC, 0666 & ~mask);
data/afio-2.5.2/afio.c:2871:69:  [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).
        arfd = mode ? creat (proc_arname, (mode_t)(0666 & ~mask)) : open (proc_arname, mode);
data/afio-2.5.2/afio.c:2873:67:  [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).
      arfd = mode ? creat (proc_arname, (mode_t)(0666 & ~mask)) : open (proc_arname, mode);
data/afio-2.5.2/afio.c:2900:8:  [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.
  auto char local[PATHSIZE];
data/afio-2.5.2/afio.c:2966: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 ((fd = open (local, O_RDONLY)) >= 0)
data/afio-2.5.2/afio.c:3037: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 ((fd = open (local, O_RDONLY)) >= 0)
data/afio-2.5.2/afio.c:3068:8:  [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.
  auto char local[PATHSIZE];
data/afio-2.5.2/afio.c:3069:8:  [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.
  auto char archlink[PATHSIZE];
data/afio-2.5.2/afio.c:3140:17:  [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 (local, O_RDONLY)) >= 0)
data/afio-2.5.2/afio.c:3205: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).
	return open("/dev/null",O_WRONLY);
data/afio-2.5.2/afio.c:3211: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).
	return open("/dev/null",O_WRONLY);
data/afio-2.5.2/afio.c:3283:8:  [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.
  auto char sname[PATHSIZE];
data/afio-2.5.2/afio.c:3593: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 (TTY, O_RDWR)) < 0)
data/afio-2.5.2/afio.c:3727: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.
    auto char name[PATHSIZE];
data/afio-2.5.2/afio.c:3728: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.
    auto char fsname[PATHSIZE];
data/afio-2.5.2/afio.c:3856:4:  [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 toc_name[PATHSIZE];
data/afio-2.5.2/afio.c:3860: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(&toc_sb,&sb,sizeof(Stat));
data/afio-2.5.2/afio.c:4016:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char localbuf[4096];
data/afio-2.5.2/afio.c:4099:8:  [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.
  auto char header[M_STRLEN + H_STRLEN + 1];
data/afio-2.5.2/afio.c:4157:8:  [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.
  auto char header[M_STRLEN + H_STRLEN + 1];
data/afio-2.5.2/afio.c:4191:8:  [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.
  auto char header[M_STRLEN + H_STRLEN2 + 1];
data/afio-2.5.2/afio.c:4225:8:  [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.
  auto char header[M_STRLEN + H_STRLEN3 + 1];
data/afio-2.5.2/afio.c:4315:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (bufidx, idx, have);
data/afio-2.5.2/afio.c:4334:8:  [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.
  auto char name[PATHSIZE];
data/afio-2.5.2/afio.c:4375:8:  [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.
  auto char block[FSBUF];
data/afio-2.5.2/afio.c:4413:8:  [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.
  auto char to[PATHSIZE];
data/afio-2.5.2/afio.c:4465:12:  [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.
			  len = sprintf(dptr,"%u", arvolume);
data/afio-2.5.2/afio.c:4471:12:  [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.
			  len = sprintf(dptr,"%llu", (unsigned long long) aruntil);
data/afio-2.5.2/afio.c:4501:8:  [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.
  auto char *arg[32];
data/afio-2.5.2/afio.c:4519: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).
      VOID open ("/dev/null", O_WRONLY);
data/afio-2.5.2/afio.c:4524: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).
      VOID open ("/dev/null", O_RDONLY);
data/afio-2.5.2/afio.c:4628: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).
      VOID open ("/dev/null", O_RDWR);
data/afio-2.5.2/afio.c:4679: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.
  static char msg[40];
data/afio-2.5.2/afio.c:4683: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.
    return ((char *) sys_errlist[errno]);
data/afio-2.5.2/afio.c:4684:8:  [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.
  VOID sprintf (msg, "Unknown error (errno %d)", errno);
data/afio-2.5.2/afio.c:4693:10:  [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.
    VOID sprintf (msg, "Unknown error (errno %d)", errno);
data/afio-2.5.2/afio.c:4710:8:  [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.
  auto char name[PATHSIZE];
data/afio-2.5.2/afio.c:5109:8:  [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.
  auto char why[100];
data/afio-2.5.2/afio.c:5127:10:  [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.
    VOID sprintf (why, "Exit %d", (status >> 8) & 0377);
data/afio-2.5.2/afio.c:5146:8:  [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.
  auto char msg[200];
data/afio-2.5.2/afio.c:5147:8:  [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.
  auto char answer[20];
data/afio-2.5.2/afio.c:5234:18:  [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).
	    answernum = atoi (answer);
data/afio-2.5.2/afio.c:5501:3:  [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 (buf, ".XXXXXX");
data/afio-2.5.2/afio.h:282:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char sb_link[PATHSIZE];
data/afio-2.5.2/afio.h:429:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
char *memcpy (char *, char *, uint);
data/afio-2.5.2/compfile.c:47: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 	* compress_arg_list[MAX_ARGS+1];
data/afio-2.5.2/compfile.c:130:2:  [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(membank+memsize,buf,(size_t)count);
data/afio-2.5.2/compfile.c:145:2:  [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(buf,membank+membytesread,(size_t)count);
data/afio-2.5.2/compfile.c:173: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 farg[3];
data/afio-2.5.2/compfile.c:193: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).
      if (open (name, O_RDONLY) >= 0)
data/afio-2.5.2/compfile.c:240:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[40960];
data/afio-2.5.2/compfile.c:364:21:  [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, ".z");
data/afio-2.5.2/compfile.c:380:23:  [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, ".z");
data/afio-2.5.2/exten.c:28: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 ex[81];
data/afio-2.5.2/exten.c:34:9:  [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).
 infile=fopen(compextsfile,"r");
data/afio-2.5.2/match.c:97: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 pat[PATHSIZE+1];
data/afio-2.5.2/match.c:100:9:  [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).
 infile=fopen(fname,"r");
data/afio-2.5.2/match.c:175:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char namec[PATHSIZE];
data/afio-2.5.2/regtest/cmpstat.c:26:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1000];
data/afio-2.5.2/regtest/makesparse.c:36:5:  [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).
  f=open(argv[1],O_RDWR);
data/afio-2.5.2/afio.c:350:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  mask = umask (0);
data/afio-2.5.2/afio.c:708:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      reg char *equal;
data/afio-2.5.2/afio.c:728:4:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			equal ? equal : myname,
data/afio-2.5.2/afio.c:728:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			equal ? equal : myname,
data/afio-2.5.2/afio.c:733:8:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	  if (equal)
data/afio-2.5.2/afio.c:977:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((got = read (STDIN, bufidx, want)) < 0)
data/afio-2.5.2/afio.c:1006:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (last = name + strlen (name); last[-1] != '/'; --last)
data/afio-2.5.2/afio.c:1009:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (dir, name, (size_t)len)[len] = '\0';
data/afio-2.5.2/afio.c:1127:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     got=read(fd,buf+totalgot,count-totalgot);
data/afio-2.5.2/afio.c:1755:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, buff1, 1) > 0)
data/afio-2.5.2/afio.c:1959:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  if ((got = read (arfd, bufend, readsize)) > 0)
data/afio-2.5.2/afio.c:1994:9:  [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).
  int l=strlen(name);
data/afio-2.5.2/afio.c:2281:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((c = getc (stream)) == EOF)
data/afio-2.5.2/afio.c:2545:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if ((mem = memget ((uint) strlen (str) + 1)))
data/afio-2.5.2/afio.c:2573:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
      VOID umask (~mode);
data/afio-2.5.2/afio.c:2622:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  msgsize = 200 + strlen(myname) * 2 + strlen(arspec);
data/afio-2.5.2/afio.c:2622:40:  [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).
  msgsize = 200 + strlen(myname) * 2 + strlen(arspec);
data/afio-2.5.2/afio.c:2687:9:  [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(msg,"\n");
data/afio-2.5.2/afio.c:2775:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  VOID writeall (ttyf, msg, (uint) strlen (msg));
data/afio-2.5.2/afio.c:2777:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((got = read (ttyf, &c, 1)) == 1)
data/afio-2.5.2/afio.c:3859:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(toc_name,name,PATHSIZE);
data/afio-2.5.2/afio.c:4024:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      got = read (fd, buf, chunk);
data/afio-2.5.2/afio.c:4033:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (read (fd, localbuf, sizeof(localbuf))>0) overflow=1;
data/afio-2.5.2/afio.c:4166: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).
  namelen = (uint) strlen (name) + 1;
data/afio-2.5.2/afio.c:4200: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).
  namelen = (uint) strlen (name) + 1;
data/afio-2.5.2/afio.c:4234: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).
  namelen = (uint) strlen (name) + 1;
data/afio-2.5.2/afio.c:4381:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((got = read (ifd, block, sizeof (block))) > 0
data/afio-2.5.2/afio.c:4417:28:  [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.
      if (nameopt (strcat (strcat (strcpy (to, *dir++), "/"), from)) < 0)
data/afio-2.5.2/afio.c:5188:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      if ((uint)(got = read (arfd, verbuf, readamt)) == readamt)
data/afio-2.5.2/afio.c:5491: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).
  else if (strlen (name) > MAXPREFIX)
data/afio-2.5.2/afio.c:5495:42:  [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 ((buf = (char *) malloc (L_tmpnam + strlen (tmpdir) + 2)) == (char *) NULL)
data/afio-2.5.2/afio.c:5499:3:  [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 (buf, "/");
data/afio-2.5.2/compfile.c:300:9:  [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 (tmpcomp) + 2 > NAME_MAX)
data/afio-2.5.2/compfile.c:303:9:  [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 (tmpcomp) + 2 > MAXNAMLEN)
data/afio-2.5.2/compfile.c:305:9:  [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 (tmpcomp) + 2 > DIRSIZ)
data/afio-2.5.2/compfile.c:323:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((len=read(zipfd,buf,sizeof(buf)))!=0)
data/afio-2.5.2/exten.c:43:8:  [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.
 while(fscanf(infile,"%80s",ex)!=EOF)
data/afio-2.5.2/exten.c:48:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
           c=fgetc(infile);
data/afio-2.5.2/exten.c:71:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
 sl=strlen(s);
data/afio-2.5.2/exten.c:75:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(sl >= strlen(p->ext))
data/afio-2.5.2/exten.c:79: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).
            if(strcmp(s+sl-strlen(p->ext),p->ext)==0) return 1;
data/afio-2.5.2/exten.c:83: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).
            if(strcasecmp(s+sl-strlen(p->ext),p->ext)==0) return 1;
data/afio-2.5.2/match.c:28:8:  [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(p[strlen(p)-1]=='*')
data/afio-2.5.2/match.c:29: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).
      return strncmp(p,s,strlen(p)-1);
data/afio-2.5.2/match.c:75:15:  [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).
  px->p_len = strlen (name);
data/afio-2.5.2/match.c:106:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     while((c = fgetc(infile))!=EOF)
data/afio-2.5.2/match.c:133:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     pat[strlen(pat)-1]='\0';
data/afio-2.5.2/match.c:135:9:  [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(pat)==0) continue; /* skip empty lines in file */
data/afio-2.5.2/match.c:137: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).
     if(pat[strlen(pat)-1]==' ')
data/afio-2.5.2/regtest/makesparse.c:45:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if(!write(f,bla,strlen(bla))) { perror("write"); fatal("write failed"); }
data/afio-2.5.2/regtest/makesparse.c:51: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(s.st_size!=pos+strlen(bla))

ANALYSIS SUMMARY:

Hits = 222
Lines analyzed = 7031 in approximately 0.43 seconds (16438 lines/second)
Physical Source Lines of Code (SLOC) = 4954
Hits@level = [0]  91 [1]  51 [2]  94 [3]   5 [4]  60 [5]  12
Hits@level+ = [0+] 313 [1+] 222 [2+] 171 [3+]  77 [4+]  72 [5+]  12
Hits/KSLOC@level+ = [0+] 63.1813 [1+] 44.8123 [2+] 34.5176 [3+] 15.543 [4+] 14.5337 [5+] 2.42229
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.