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/cdtool-2.1.8-release/cdtool2cddb.c
Examining data/cdtool-2.1.8-release/shuffle.h
Examining data/cdtool-2.1.8-release/hardware.h
Examining data/cdtool-2.1.8-release/commands.h
Examining data/cdtool-2.1.8-release/util.c
Examining data/cdtool-2.1.8-release/util.h
Examining data/cdtool-2.1.8-release/cdtool.h
Examining data/cdtool-2.1.8-release/info.c
Examining data/cdtool-2.1.8-release/database.c
Examining data/cdtool-2.1.8-release/info.h
Examining data/cdtool-2.1.8-release/database.h
Examining data/cdtool-2.1.8-release/shuffle.c
Examining data/cdtool-2.1.8-release/hardware.c
Examining data/cdtool-2.1.8-release/cdctrl.c
Examining data/cdtool-2.1.8-release/cdown.c
Examining data/cdtool-2.1.8-release/cdtool.c
Examining data/cdtool-2.1.8-release/commands.c

FINAL RESULTS:

data/cdtool-2.1.8-release/util.c:191:10:  [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.
    ii = readlink(pszName, caB, sizeof(caB)-1);
data/cdtool-2.1.8-release/cdown.c:260:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  len = vsnprintf(buffer, sizeof(buffer), fmt, args);
data/cdtool-2.1.8-release/cdown.c:531: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(matches[count-1], message);
data/cdtool-2.1.8-release/cdtool2cddb.c:113:7:  [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 (b->title, buf+7);
data/cdtool-2.1.8-release/cdtool2cddb.c:119:7:  [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 (b->artist, buf+7);
data/cdtool-2.1.8-release/cdtool2cddb.c:153:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  buflen = vsnprintf (buf, sizeof(buf)-1, fmt, ap);
data/cdtool-2.1.8-release/cdtool2cddb.c:165:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy (outbuf, prefix);
data/cdtool-2.1.8-release/cdtool2cddb.c:311:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf (outfile, OUTFILE_FORMAT, outdir, cdb.id);
data/cdtool-2.1.8-release/database.c:77:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(dbpath[0], prec->pw_dir);
data/cdtool-2.1.8-release/database.c:84:13:  [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(dbpath[dbpath_count++], path_bit);
data/cdtool-2.1.8-release/util.c:84:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
            snprintf(dev, sizeof(dev), m->name, i);
data/cdtool-2.1.8-release/util.c:284:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(term, fmt, args);
data/cdtool-2.1.8-release/cdctrl.c:250:24:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    extern int optind, getopt();
data/cdtool-2.1.8-release/cdown.c:655:22:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  extern int	optind, getopt();
data/cdtool-2.1.8-release/cdown.c:676:18:  [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 ((pszHost = getenv("CDDBHOST")) == NULL)
data/cdtool-2.1.8-release/cdown.c:679:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((opt = getopt(argc,argv,"0123456789?DhlrVvH:P:d:")) != EOF) {
data/cdtool-2.1.8-release/cdtool.c:71:22:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  extern int	optind, getopt();
data/cdtool-2.1.8-release/cdtool.c:88:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while((opt = getopt(argc,argv,"0123456789?ad:Dhi:nrstvVp:R:T:")) != EOF)
data/cdtool-2.1.8-release/cdtool2cddb.c:266:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt (argc, argv, "hd:l:rvx")) > -1) {
data/cdtool-2.1.8-release/database.c:64:22:  [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.
    char *path_env = getenv("CDTOOLDBPATH");
data/cdtool-2.1.8-release/shuffle.c:279:7:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      srand(time(NULL));
data/cdtool-2.1.8-release/util.c:73:37:  [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 (choice != NULL || (choice = getenv("CDTOOLDEV")) != NULL) {
data/cdtool-2.1.8-release/cdctrl.c:44: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 caLineIn[BUFSIZ];
data/cdtool-2.1.8-release/cdctrl.c:151:9:  [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).
	iTrk = atoi (pszBuf);
data/cdtool-2.1.8-release/cdown.c:137: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).
    drive = open(pszCD, O_RDONLY | O_NONBLOCK);
data/cdtool-2.1.8-release/cdown.c:255: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 buffer[8192];
data/cdtool-2.1.8-release/cdown.c:347: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 newdata[1024];
data/cdtool-2.1.8-release/cdown.c:364:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer+buffered, newdata, len);	/* add the new data */
data/cdtool-2.1.8-release/cdown.c:390:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  switch (atoi(message)) {
data/cdtool-2.1.8-release/cdown.c:414:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  switch (atoi(message)) {
data/cdtool-2.1.8-release/cdown.c:455:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  switch (atoi(message)) {
data/cdtool-2.1.8-release/cdown.c:515:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  switch (atoi(message)) {
data/cdtool-2.1.8-release/cdown.c:610: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 buffer[80];	/* is 80 long enough? */
data/cdtool-2.1.8-release/cdown.c:632:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  switch (atoi(buffer)) {
data/cdtool-2.1.8-release/cdown.c:704:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  iPort = atoi(optarg);
data/cdtool-2.1.8-release/cdtool.c:197: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).
	      iRepeat = atoi(optarg);
data/cdtool-2.1.8-release/cdtool.c:206: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).
	      iTracks = atoi(optarg);
data/cdtool-2.1.8-release/cdtool.c:244:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    trk0=atoi(argv[optind++]);
data/cdtool-2.1.8-release/cdtool.c:247:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    trk1=atoi(argv[optind]);
data/cdtool-2.1.8-release/cdtool.c:315: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).
		  int vol=atoi(argv[optind]);
data/cdtool-2.1.8-release/cdtool.c:353: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).
      int vol=atoi(argv[optind]);
data/cdtool-2.1.8-release/cdtool2cddb.c:46: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 title[MAXTRKLEN];
data/cdtool-2.1.8-release/cdtool2cddb.c:47: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 artist[MAXTRKLEN];
data/cdtool-2.1.8-release/cdtool2cddb.c:48: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 track[MAXTRACKS][MAXTRKLEN];
data/cdtool-2.1.8-release/cdtool2cddb.c:78: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 buf[1024];
data/cdtool-2.1.8-release/cdtool2cddb.c:94:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      b->tracks = atoi (p);
data/cdtool-2.1.8-release/cdtool2cddb.c:102: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).
	b->offset[i] = atoi (p);
data/cdtool-2.1.8-release/cdtool2cddb.c:148: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[1024];
data/cdtool-2.1.8-release/cdtool2cddb.c:200:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char label[12];
data/cdtool-2.1.8-release/cdtool2cddb.c:201:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (label, "TTITLE%d=", i);
data/cdtool-2.1.8-release/cdtool2cddb.c:273:23:  [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).
      cddb_max_line = atoi (optarg);
data/cdtool-2.1.8-release/cdtool2cddb.c:292:13:  [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).
      fin = fopen (argv[optind], "r");
data/cdtool-2.1.8-release/cdtool2cddb.c:312:14:  [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).
      fout = fopen (outfile, "w");
data/cdtool-2.1.8-release/commands.c:59:15:  [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(cddev, O_RDONLY | O_NONBLOCK)) < 0) {
data/cdtool-2.1.8-release/database.c:69: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 dbpath[10][255];
data/cdtool-2.1.8-release/database.c:78:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat(dbpath[0], "/.cdtooldb");
data/cdtool-2.1.8-release/database.c:88:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char read_buffer[2048];
data/cdtool-2.1.8-release/database.c:90:22:  [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).
        FILE *fred = fopen(dbpath[cur_file], "r");
data/cdtool-2.1.8-release/database.h:4: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 track_names[100][100];
data/cdtool-2.1.8-release/database.h:5: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 cdname[100];
data/cdtool-2.1.8-release/database.h:6: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 artist[100];
data/cdtool-2.1.8-release/info.c:34: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 caBuff[(BUFSIZ > (20 + 8*100)) ? BUFSIZ : (20 + 8*100)];
data/cdtool-2.1.8-release/info.c:59:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(tempstr, "tracks %u ", hw->tochdr.cdth_trk1);
data/cdtool-2.1.8-release/info.c:61: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(tempstr + strlen(tempstr), "%u ",
data/cdtool-2.1.8-release/info.c:65:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(tempstr + strlen(tempstr), "%u", 
data/cdtool-2.1.8-release/shuffle.c:153: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 pidfile[PATH_MAX];
data/cdtool-2.1.8-release/shuffle.c:165:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen (pidfile, "w");
data/cdtool-2.1.8-release/shuffle.c:184: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 buf[255];
data/cdtool-2.1.8-release/shuffle.c:185: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 pidfile[PATH_MAX];
data/cdtool-2.1.8-release/shuffle.c:196:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen (pidfile, "r");
data/cdtool-2.1.8-release/shuffle.c:204:23:  [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).
        shuffle_pid = atoi (buf);
data/cdtool-2.1.8-release/util.c:51: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 dev[PATH_MAX];
data/cdtool-2.1.8-release/util.c:187: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   caB[100];
data/cdtool-2.1.8-release/cdctrl.c:339: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).
            iRead = strlen(caLineIn);
data/cdtool-2.1.8-release/cdown.c:359:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((len = read(sock, newdata, 1024)) < 0) {
data/cdtool-2.1.8-release/cdown.c:372: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).
  buffered -= strlen(lastline)+1;	/* this data is no longer buffered */
data/cdtool-2.1.8-release/cdown.c:530:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        matches[count-1] = malloc(strlen(message)+1);
data/cdtool-2.1.8-release/cdtool2cddb.c:63: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).
  int l = strlen (str) - 1;
data/cdtool-2.1.8-release/cdtool2cddb.c:111:23:  [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 (MAXTRKLEN < strlen(b->title) + strlen(buf+7) + 1)
data/cdtool-2.1.8-release/cdtool2cddb.c:111: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 (MAXTRKLEN < strlen(b->title) + strlen(buf+7) + 1)
data/cdtool-2.1.8-release/cdtool2cddb.c:117:23:  [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 (MAXTRKLEN < strlen(b->artist) + strlen(buf+7) + 1)
data/cdtool-2.1.8-release/cdtool2cddb.c:117:43:  [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 (MAXTRKLEN < strlen(b->artist) + strlen(buf+7) + 1)
data/cdtool-2.1.8-release/cdtool2cddb.c:125:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (b->track[trk], buf+6, MAXTRKLEN-1);
data/cdtool-2.1.8-release/cdtool2cddb.c:160: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).
  buflen = strlen(buf);
data/cdtool-2.1.8-release/cdtool2cddb.c:161:23:  [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).
  perline = linelen - strlen (prefix);
data/cdtool-2.1.8-release/cdtool2cddb.c:164:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *outbuf = malloc(strlen(prefix) + perline + 1);
data/cdtool-2.1.8-release/cdtool2cddb.c:166:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat (outbuf, buf+l, perline);
data/cdtool-2.1.8-release/cdtool2cddb.c:310: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).
      outfile = malloc(strlen(outdir) + 1 + 16 + 1); 
data/cdtool-2.1.8-release/database.c:35: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).
    int l=strlen(c)-1;
data/cdtool-2.1.8-release/database.c:96:4:  [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).
			strlen(tracks_buffer)) == 0) {
data/cdtool-2.1.8-release/database.c:103:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(temp_cd->track_names[cur_track++], 
data/cdtool-2.1.8-release/database.c:106:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(temp_cd->cdname, &read_buffer[7],99);
data/cdtool-2.1.8-release/database.c:108:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(temp_cd->artist, &read_buffer[7],99);
data/cdtool-2.1.8-release/info.c:61: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).
	sprintf(tempstr + strlen(tempstr), "%u ",
data/cdtool-2.1.8-release/info.c:65:23:  [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).
    sprintf(tempstr + strlen(tempstr), "%u", 

ANALYSIS SUMMARY:

Hits = 95
Lines analyzed = 4125 in approximately 0.18 seconds (22967 lines/second)
Physical Source Lines of Code (SLOC) = 2542
Hits@level = [0] 163 [1]  22 [2]  51 [3]  10 [4]  11 [5]   1
Hits@level+ = [0+] 258 [1+]  95 [2+]  73 [3+]  22 [4+]  12 [5+]   1
Hits/KSLOC@level+ = [0+] 101.495 [1+] 37.3721 [2+] 28.7175 [3+] 8.6546 [4+] 4.72069 [5+] 0.393391
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.