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/cdparanoia-3.10.2+debian/version.h
Examining data/cdparanoia-3.10.2+debian/cachetest.c
Examining data/cdparanoia-3.10.2+debian/header.h
Examining data/cdparanoia-3.10.2+debian/paranoia/isort.h
Examining data/cdparanoia-3.10.2+debian/paranoia/isort.c
Examining data/cdparanoia-3.10.2+debian/paranoia/p_block.h
Examining data/cdparanoia-3.10.2+debian/paranoia/gap.c
Examining data/cdparanoia-3.10.2+debian/paranoia/gap.h
Examining data/cdparanoia-3.10.2+debian/paranoia/overlap.h
Examining data/cdparanoia-3.10.2+debian/paranoia/cdda_paranoia.h
Examining data/cdparanoia-3.10.2+debian/paranoia/overlap.c
Examining data/cdparanoia-3.10.2+debian/paranoia/p_block.c
Examining data/cdparanoia-3.10.2+debian/paranoia/paranoia.c
Examining data/cdparanoia-3.10.2+debian/report.h
Examining data/cdparanoia-3.10.2+debian/header.c
Examining data/cdparanoia-3.10.2+debian/interface/toc.c
Examining data/cdparanoia-3.10.2+debian/interface/common_interface.h
Examining data/cdparanoia-3.10.2+debian/interface/smallft.h
Examining data/cdparanoia-3.10.2+debian/interface/drive_exceptions.h
Examining data/cdparanoia-3.10.2+debian/interface/smallft.c
Examining data/cdparanoia-3.10.2+debian/interface/cdda_interface.h
Examining data/cdparanoia-3.10.2+debian/interface/test_interface.c
Examining data/cdparanoia-3.10.2+debian/interface/common_interface.c
Examining data/cdparanoia-3.10.2+debian/interface/cooked_interface.c
Examining data/cdparanoia-3.10.2+debian/interface/interface.c
Examining data/cdparanoia-3.10.2+debian/interface/low_interface.h
Examining data/cdparanoia-3.10.2+debian/interface/scan_devices.c
Examining data/cdparanoia-3.10.2+debian/interface/scsi_interface.c
Examining data/cdparanoia-3.10.2+debian/interface/utils.h
Examining data/cdparanoia-3.10.2+debian/buffering_write.c
Examining data/cdparanoia-3.10.2+debian/report.c
Examining data/cdparanoia-3.10.2+debian/utils.h
Examining data/cdparanoia-3.10.2+debian/main.c

FINAL RESULTS:

data/cdparanoia-3.10.2+debian/cachetest.c:43:36:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define reportC(...) {if(progress){fprintf(progress, __VA_ARGS__);}	\
data/cdparanoia-3.10.2+debian/cachetest.c:44:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    if(log){fprintf(log, __VA_ARGS__);}}
data/cdparanoia-3.10.2+debian/cachetest.c:45:35:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define printC(...) {if(progress){fprintf(progress, __VA_ARGS__);}}
data/cdparanoia-3.10.2+debian/cachetest.c:46:28:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define logC(...) {if(log){fprintf(log, __VA_ARGS__);}}
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:112:6:  [4] (misc) cuserid:
  Exactly what cuserid() does is poorly defined (e.g., some systems use the
  effective uid, like Linux, while others like System V use the real uid).
  Thus, you can't trust what it does. It's certainly not portable (The
  cuserid function was included in the 1988 version of POSIX, but removed
  from the 1990 version). Also, if passed a non-null parameter, there's a
  risk of a buffer overflow if the passed-in buffer is not at least L_cuserid
  characters long (CWE-120). Use getpwuid(geteuid()) and extract the desired
  information instead.
	    cuserid(NULL));
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:400: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(buffer,device);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:404:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(pos,"/%s",devfs_other);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:443:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(buffer,"%s%d",prefixes[pattern],i);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:447:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(buffer,"%s%c",prefixes[pattern],i+'a');
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1229:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(b,"                 Transport error: %s\n",strerror_tr[err]);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1231:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(b,"                 System error: %s\n",strerror(errno));
data/cdparanoia-3.10.2+debian/interface/utils.h:92: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(ret,s);
data/cdparanoia-3.10.2+debian/interface/utils.h:104:5:  [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(buff,s);
data/cdparanoia-3.10.2+debian/interface/utils.h:153:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buffer,f,s);
data/cdparanoia-3.10.2+debian/interface/utils.h:197:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buffer,f,s);
data/cdparanoia-3.10.2+debian/main.c:195:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( f,
data/cdparanoia-3.10.2+debian/main.c:578:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(buffer,
data/cdparanoia-3.10.2+debian/main.c:584:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(buffer,
data/cdparanoia-3.10.2+debian/main.c:589:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(buffer,
data/cdparanoia-3.10.2+debian/main.c:597:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr,buffer);
data/cdparanoia-3.10.2+debian/main.c:600:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  fprintf(logfile,buffer+1);
data/cdparanoia-3.10.2+debian/main.c:797:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(stderr,VERSION);
data/cdparanoia-3.10.2+debian/main.c:916:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(logfile,VERSION);
data/cdparanoia-3.10.2+debian/report.h:5:33:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define report(...) {if(!quiet){fprintf(stderr, __VA_ARGS__);fputc('\n',stderr);} \
data/cdparanoia-3.10.2+debian/report.h:6:20:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    if(reportfile){fprintf(reportfile, __VA_ARGS__);fputc('\n',reportfile);}}
data/cdparanoia-3.10.2+debian/report.h:7:34:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define reportC(...) {if(!quiet){fprintf(stderr, __VA_ARGS__);}	\
data/cdparanoia-3.10.2+debian/report.h:8:20:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    if(reportfile){fprintf(reportfile, __VA_ARGS__);}}
data/cdparanoia-3.10.2+debian/report.h:9:33:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define printC(...) {if(!quiet){fprintf(stderr, __VA_ARGS__);}}
data/cdparanoia-3.10.2+debian/report.h:10:35:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define logC(...) {if(reportfile){fprintf(reportfile, __VA_ARGS__);}}
data/cdparanoia-3.10.2+debian/utils.h:94: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(ret,s);
data/cdparanoia-3.10.2+debian/utils.h:106:5:  [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(buff,s);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:155:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  if(realpath(file,resolved))
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:85:8:  [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 (!getenv("CDDA_IGNORE_BUFSIZE_LIMIT")) {
data/cdparanoia-3.10.2+debian/interface/test_interface.c:84:16:  [3] (random) drand48:
  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.
  jitter_flag=(drand48()>.9?1:0);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:85:13:  [3] (random) drand48:
  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.
  los_flag=(drand48()>.9?1:0);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:108:36:  [3] (random) drand48:
  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.
    if(jitter_flag)jitter=4*(int)((drand48()-.5)*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:112:37:  [3] (random) drand48:
  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.
    if(jitter_flag)jitter=32*(int)((drand48()-.5)*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:116:38:  [3] (random) drand48:
  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.
    if(jitter_flag)jitter=128*(int)((drand48()-.5)*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:120:38:  [3] (random) drand48:
  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.
    if(los_flag)this_bytes=256*(int)(drand48()*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:121:36:  [3] (random) drand48:
  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.
    if(jitter_flag)jitter=4*(int)((drand48()-.5)*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:125:37:  [3] (random) drand48:
  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.
    if(los_flag)this_bytes=16*(int)(drand48()*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:126:36:  [3] (random) drand48:
  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.
    if(jitter_flag)jitter=4*(int)((drand48()-.5)*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:130:36:  [3] (random) drand48:
  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.
    if(los_flag)this_bytes=8*(int)(drand48()*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:131:37:  [3] (random) drand48:
  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.
    if(jitter_flag)jitter=32*(int)((drand48()-.5)*CD_FRAMESIZE_RAW/8);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:137:11:  [3] (random) drand48:
  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.
      if (drand48()>.8)
data/cdparanoia-3.10.2+debian/interface/test_interface.c:179:18:  [3] (random) drand48:
  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.
    jitter_flag=(drand48()>.9?1:0);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:180:15:  [3] (random) drand48:
  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.
    los_flag=(drand48()>.9?1:0);
data/cdparanoia-3.10.2+debian/interface/test_interface.c:191:41:  [3] (random) drand48:
  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.
    long location=300*CD_FRAMESIZE_RAW+(drand48()*56)+512;
data/cdparanoia-3.10.2+debian/interface/test_interface.c:194:42:  [3] (random) drand48:
  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.
      if(p)memset(p+location-begin,(int)(drand48()*256),1100);
data/cdparanoia-3.10.2+debian/main.c:713:12:  [3] (buffer) getopt_long:
  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_long(argc,argv,optstring,options,&long_option_index))!=EOF){
data/cdparanoia-3.10.2+debian/buffering_write.c:18: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.
static char bw_outbuf[OUTBUFSZ];
data/cdparanoia-3.10.2+debian/buffering_write.c:42: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(&bw_outbuf[bw_pos], buffer, OUTBUFSZ - bw_pos);
data/cdparanoia-3.10.2+debian/buffering_write.c:53: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(&bw_outbuf[bw_pos], buffer, num);
data/cdparanoia-3.10.2+debian/interface/cdda_interface.h:89:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char inqbytes[4];
data/cdparanoia-3.10.2+debian/interface/common_interface.c:158: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 buffer[256];
data/cdparanoia-3.10.2+debian/interface/common_interface.c:160: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(buffer,"\tcertainty: %d%%\n",(int)
data/cdparanoia-3.10.2+debian/interface/common_interface.c:166:7:  [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[256];
data/cdparanoia-3.10.2+debian/interface/common_interface.c:168:7:  [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(buffer,"\tcertainty: %d%%\n",(int)
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:133: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 b[256];
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:134:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(b,"010: Unable to access sector %ld: skipping...\n",
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:269:7:  [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 b[256];
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:380: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 buffer[256];
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:382:4:  [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(buffer,"\tTrouble setting buffer size.  Defaulting to %d sectors.\n",
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:388:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[256];
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:389: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(buffer,"\tSetting read block size at %d sectors (%ld bytes).\n",
data/cdparanoia-3.10.2+debian/interface/scan_devices.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 resolved[PATH_MAX];
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:207:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd=open(device,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:322:21:  [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 ((d->ioctl_fd = open(dev, O_RDONLY)) == -1) {
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:390: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).
  int dev=open(device,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:394: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[200];
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:405: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).
      matchf=open(buffer,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:409: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).
        matchf = open(buffer,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:451: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).
	matchf=open(buffer,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:455: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).
	  matchf=open(buffer,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:499: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[256];
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:516: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(buffer,"\tSG interface version %d.%d.%d; OK.",
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:532:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd = open(device, O_RDWR|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:696: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).
      i_fd=open(specialized_device,O_RDWR|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:698: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).
      i_fd=open(specialized_device,O_RDONLY|O_NONBLOCK);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:702:10:  [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).
    g_fd=open(generic_device,O_RDWR);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:837: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(d->inqbytes,p,4);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:977:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd=open(filename,O_RDONLY);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:42: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[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:64: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(buffer,"\tDMA scatter/gather table entries: %d\n\t"
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:95: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(buffer,"\tSetting default read size to %d sectors (%d bytes).\n\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:104: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(buffer,"\tSetting default read size to %d sectors (%d bytes).\n\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:221: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(d->private_data->sg_buffer,cmd,cmd_len+in_size);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:319: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(sense_buffer,sg_hd->sense_buffer,SG_MAX_SENSE);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:373: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(d->private_data->sg_buffer,cmd+cmd_len,in_size);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:471: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(d->private_data->ccb->csio.cdb_io.cdb_bytes, cmd, cmd_len);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:472: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(d->private_data->sg_buffer, cmd + cmd_len, write_len);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:545:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:547:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[6] =  { 0x00, /* TEST_UNIT_READY */	
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:608:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:609:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[10]= {0x5A,   /* MODE_SENSE */
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:644:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:645:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[6]={0x1A, /* MODE_SENSE */
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:676:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:678:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cmd[26] = { 0x55, /* MODE_SELECT */
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:709:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char cmd[18] = { 0x15, /* MODE_SELECT */
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:790:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:791:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[10] = { 0x43, 0, 0, 0, 0, 0, 1, 0, 12, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:809: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(cmd, (char []){ 0x43, 0, 0, 0, 0, 0, 0, 0, 12, 0}, 10);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:830: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(cmd, (char []){ 0x43, 0, 0, 0, 0, 0, 0, 0, 12, 0}, 10);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:862:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[10] = { 0xe5, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:863:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:880: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(cmd, (char[]){ 0xe5, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 10);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:901: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 (&foo, d->private_data->sg_buffer+2, 4);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:902: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 (&bar, d->private_data->sg_buffer+6, 4);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:923:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xBB, 0, 0, 0, 0xff, 0xff, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:924:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:939:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[10]={0x28, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:952:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:958:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xA8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:971:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:977:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[10]={0xd4, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:989:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:995:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xd4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1007:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1013:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[10]={0xd5, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1025:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1031:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xd8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1043:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1049:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xbe, 0x2, 0, 0, 0, 0, 0, 0, 0, 0x10, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1057:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1063:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xbe, 0x0, 0, 0, 0, 0, 0, 0, 0, 0x10, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1071:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1077:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xbe, 0x2, 0, 0, 0, 0, 0, 0, 0, 0xf8, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1085:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1091:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xbe, 0x0, 0, 0, 0, 0, 0, 0, 0, 0xf8, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1099:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1105:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xbe, 0x6, 0, 0, 0, 0, 0, 0, 0, 0xf8, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1113:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1119:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xbe, 0x4, 0, 0, 0, 0, 0, 0, 0, 0xf8, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1127:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1154:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xb9, 0, 0, 0, 0, 0, 0, 0, 0, 0x10, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1161:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1167:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xb9, 0, 0, 0, 0, 0, 0, 0, 0, 0xf8, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1174:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1180:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[12]={0xb9, 4, 0, 0, 0, 0, 0, 0, 0, 0xf8, 0, 0};
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1187:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1195:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1209: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 b[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1211: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(b,"scsi_read error: sector=%ld length=%ld retry=%d\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1215: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(b,"                 Sense key: %x ASC: %x ASCQ: %x\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1223: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(b,"                 Sense key: %x ASC: %x ASCQ: %x\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1266: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 b[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1267:4:  [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(b,"scsi_read: kernel couldn't alloc %ld bytes.  "
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1289: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 b[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1290:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(b,"010: Unable to access sector %ld\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1319: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 b[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1320:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(b,"scsi_read underrun: pos=%ld len=%ld read=%ld retry=%d\n",
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1667: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 buffer[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1668:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(buffer,"\t\tDrive rejected read command packet(s)\n");
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1672: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 buffer[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1673:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(buffer,"\t\tDrive returned at least one packet, but with\n"
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1678: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 buffer[256];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1679:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(buffer,"\t\tDrive returned %d packet(s), but contents\n"
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1864:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sense[SG_MAX_SENSE];
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1865:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cmd[6]={ 0x12,0,0,0,56,0 };
data/cdparanoia-3.10.2+debian/main.c:72: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).
      track=atoi(offset);
data/cdparanoia-3.10.2+debian/main.c:88: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).
      val=atoi(sec+1);
data/cdparanoia-3.10.2+debian/main.c:348: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.
static char *callback_strings[16]={"wrote",
data/cdparanoia-3.10.2+debian/main.c:376: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[256];
data/cdparanoia-3.10.2+debian/main.c:725:27:  [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).
      force_cdrom_sectors=atoi(optarg);
data/cdparanoia-3.10.2+debian/main.c:728:27:  [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).
      force_cdrom_overlap=atoi(optarg);
data/cdparanoia-3.10.2+debian/main.c:752:25:  [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).
      force_cdrom_speed=atoi(optarg);
data/cdparanoia-3.10.2+debian/main.c:818: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).
        max_retries = atoi (optarg);
data/cdparanoia-3.10.2+debian/main.c:847: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).
      toc_offset=atoi(optarg);
data/cdparanoia-3.10.2+debian/main.c:864:21:  [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).
      sample_offset=atoi(optarg);
data/cdparanoia-3.10.2+debian/main.c:879:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      logfile=fopen(logfile_name,"w");
data/cdparanoia-3.10.2+debian/main.c:898: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).
	reportfile=fopen(reportfile_name,"w");
data/cdparanoia-3.10.2+debian/main.c:1219: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 outfile_name[256];
data/cdparanoia-3.10.2+debian/main.c:1249: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 path[256];
data/cdparanoia-3.10.2+debian/main.c:1268: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(outfile_name,"cdda.raw");
data/cdparanoia-3.10.2+debian/main.c:1271: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(outfile_name,"cdda.wav");
data/cdparanoia-3.10.2+debian/main.c:1274: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(outfile_name,"cdda.aifc");
data/cdparanoia-3.10.2+debian/main.c:1277: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(outfile_name,"cdda.aiff");
data/cdparanoia-3.10.2+debian/main.c:1282:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    out=open(outfile_name,O_RDWR|O_CREAT|O_TRUNC,0666);
data/cdparanoia-3.10.2+debian/main.c:1299:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(outfile_name,"track%02d.",batch_track);
data/cdparanoia-3.10.2+debian/main.c:1305:6:  [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(outfile_name,"cdda.raw");
data/cdparanoia-3.10.2+debian/main.c:1308:6:  [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(outfile_name,"cdda.wav");
data/cdparanoia-3.10.2+debian/main.c:1311:6:  [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(outfile_name,"cdda.aifc");
data/cdparanoia-3.10.2+debian/main.c:1314:6:  [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(outfile_name,"cdda.aiff");
data/cdparanoia-3.10.2+debian/main.c:1318:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  out=open(outfile_name,O_RDWR|O_CREAT|O_TRUNC,0666);
data/cdparanoia-3.10.2+debian/main.c:1442:8:  [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(offset_buffer,readbuf,CD_FRAMESIZE_RAW);
data/cdparanoia-3.10.2+debian/paranoia/p_block.c:236: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(v->vector+pos,b,size*sizeof(int16_t));
data/cdparanoia-3.10.2+debian/paranoia/p_block.c:260: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(v->vector+pos,b,size*sizeof(int16_t));
data/cdparanoia-3.10.2+debian/paranoia/p_block.c:271: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(v->vector+vs,vector,sizeof(int16_t)*size);
data/cdparanoia-3.10.2+debian/paranoia/paranoia.c:1277: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(buff,fv(v),fs(v)*sizeof(int16_t));
data/cdparanoia-3.10.2+debian/paranoia/paranoia.c:1523: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(buff,fv(v),fs(v)*sizeof(int16_t));
data/cdparanoia-3.10.2+debian/paranoia/paranoia.c:1854: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(buff,fv(v),fs(v)*sizeof(int16_t));
data/cdparanoia-3.10.2+debian/paranoia/paranoia.c:2156: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(buff,cv(graft),cs(graft));
data/cdparanoia-3.10.2+debian/cachetest.c:527:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	  usleep(usec);
data/cdparanoia-3.10.2+debian/cachetest.c:577:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(usec);
data/cdparanoia-3.10.2+debian/cachetest.c:655:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(usec);
data/cdparanoia-3.10.2+debian/interface/cooked_interface.c:349:46:  [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(!strncmp(list[i].model,d->drive_model,strlen(list[i].model))){
data/cdparanoia-3.10.2+debian/interface/drive_exceptions.h:15:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  long (*read)(struct cdrom_drive *,void *,long,long);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:398:33:  [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(!strncmp(device,devfs_test,strlen(devfs_test))){
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:408:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1000000 + 100000.0 * rand()/(RAND_MAX+1.0));
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:454:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	  usleep(1000000 + 100000.0 * rand()/(RAND_MAX+1.0));
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:488:3:  [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(a,b,i);
data/cdparanoia-3.10.2+debian/interface/scan_devices.c:489: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(a," ");
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:131:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(d->cdda_fd, sg_hd, 1);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:317:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:578:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(10);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1255:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(100);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1259:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(100);
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1850:46:  [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(!strncmp(list[i].model,d->drive_model,strlen(list[i].model))){
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1853:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if(list[i].read)d->read_audio=list[i].read;
data/cdparanoia-3.10.2+debian/interface/scsi_interface.c:1853:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if(list[i].read)d->read_audio=list[i].read;
data/cdparanoia-3.10.2+debian/interface/utils.h:90: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).
    char *ret=malloc((strlen(s)+9)*sizeof(char)); /* +9 to get around a linux
data/cdparanoia-3.10.2+debian/interface/utils.h:101:25:  [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).
      buff=realloc(buff,strlen(buff)+strlen(s)+9);
data/cdparanoia-3.10.2+debian/interface/utils.h:101:38:  [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).
      buff=realloc(buff,strlen(buff)+strlen(s)+9);
data/cdparanoia-3.10.2+debian/interface/utils.h:103: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).
      buff=calloc(strlen(s)+9,1);
data/cdparanoia-3.10.2+debian/interface/utils.h:113: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).
      write(STDERR_FILENO,s,strlen(s));
data/cdparanoia-3.10.2+debian/interface/utils.h:129: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).
      write(STDERR_FILENO,s,strlen(s));
data/cdparanoia-3.10.2+debian/interface/utils.h:152: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).
      buffer=malloc(strlen(f)+strlen(s)+9);
data/cdparanoia-3.10.2+debian/interface/utils.h:152:31:  [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).
      buffer=malloc(strlen(f)+strlen(s)+9);
data/cdparanoia-3.10.2+debian/interface/utils.h:160:34:  [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).
      write(STDERR_FILENO,buffer,strlen(buffer));
data/cdparanoia-3.10.2+debian/interface/utils.h:163:38:  [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).
	write(STDERR_FILENO,strerror(errno),strlen(strerror(errno)));
data/cdparanoia-3.10.2+debian/interface/utils.h:196: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).
      buffer=malloc(strlen(f)+strlen(s)+10);
data/cdparanoia-3.10.2+debian/interface/utils.h:196:31:  [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).
      buffer=malloc(strlen(f)+strlen(s)+10);
data/cdparanoia-3.10.2+debian/interface/utils.h:198:7:  [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(buffer,"\n");
data/cdparanoia-3.10.2+debian/interface/utils.h:205:34:  [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).
      write(STDERR_FILENO,buffer,strlen(buffer));
data/cdparanoia-3.10.2+debian/main.c:1258:8:  [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(path,argv[optind+1],pos>256?256:pos);
data/cdparanoia-3.10.2+debian/utils.h:93: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).
    char *ret=malloc((strlen(s)+1)*sizeof(char));
data/cdparanoia-3.10.2+debian/utils.h:103:25:  [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).
      buff=realloc(buff,strlen(buff)+strlen(s)+1);
data/cdparanoia-3.10.2+debian/utils.h:103:38:  [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).
      buff=realloc(buff,strlen(buff)+strlen(s)+1);
data/cdparanoia-3.10.2+debian/utils.h:105: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).
      buff=calloc(strlen(s)+1,1);

ANALYSIS SUMMARY:

Hits = 230
Lines analyzed = 12589 in approximately 0.42 seconds (30292 lines/second)
Physical Source Lines of Code (SLOC) = 8026
Hits@level = [0]  40 [1]  37 [2] 143 [3]  19 [4]  31 [5]   0
Hits@level+ = [0+] 270 [1+] 230 [2+] 193 [3+]  50 [4+]  31 [5+]   0
Hits/KSLOC@level+ = [0+] 33.6407 [1+] 28.6569 [2+] 24.0468 [3+] 6.22975 [4+] 3.86245 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.