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/wmmixer-1.8/mixctl.cc
Examining data/wmmixer-1.8/xhandler.h
Examining data/wmmixer-1.8/xhandler.cc
Examining data/wmmixer-1.8/exception.h
Examining data/wmmixer-1.8/common.h
Examining data/wmmixer-1.8/mixctl.h
Examining data/wmmixer-1.8/exception.cc
Examining data/wmmixer-1.8/wmmixer.h
Examining data/wmmixer-1.8/wmmixer.cc

FINAL RESULTS:

data/wmmixer-1.8/exception.cc:28:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(error_message_, other_message);
data/wmmixer-1.8/exception.cc:52:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(error_message_, device);
data/wmmixer-1.8/mixctl.cc:19:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(device_, device_name);
data/wmmixer-1.8/wmmixer.cc:29:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(mixer_device_, MIXERDEV);
data/wmmixer-1.8/wmmixer.cc:252:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(argv[i], "%s", "-g");
data/wmmixer-1.8/wmmixer.cc:256:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(argv[i], "%s", "-h");
data/wmmixer-1.8/wmmixer.cc:260:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(argv[i], "%s", "-d");
data/wmmixer-1.8/wmmixer.cc:301:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(mixer_device_, "%s", optarg);
data/wmmixer-1.8/xhandler.cc:22:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(ledcolor_name_, LEDCOLOR);
data/wmmixer-1.8/xhandler.cc:23:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(ledcolor_high_name_, LEDCOLOR_HIGH);
data/wmmixer-1.8/xhandler.cc:24:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(backcolor_name_, BACKCOLOR);
data/wmmixer-1.8/xhandler.cc:25:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(window_class_, CLASS);
data/wmmixer-1.8/xhandler.cc:311:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(display_name_, "%s", arg);
data/wmmixer-1.8/xhandler.cc:317:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(position_name_, "%s", arg);
data/wmmixer-1.8/xhandler.cc:323:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(ledcolor_name_, "%s", arg);
data/wmmixer-1.8/xhandler.cc:329:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(ledcolor_high_name_, "%s", arg);
data/wmmixer-1.8/xhandler.cc:335:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(backcolor_name_, "%s", arg);
data/wmmixer-1.8/wmmixer.cc:245:59:  [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.
  snprintf(config_file_, CONFIGFILELEN -1, "%s/.wmmixer", getenv("HOME"));
data/wmmixer-1.8/wmmixer.cc:264:15:  [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 ((i = getopt_long(argc, argv, "hvd:g:wasl:L:b:m:c:x:r:", long_opts, &opt_index)) != -1)
data/wmmixer-1.8/exception.cc:51:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy(error_message_, "Unable to open mixer device ");
data/wmmixer-1.8/mixctl.cc:23: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((mixfd = open(device_,O_RDONLY | O_NONBLOCK)) != -1)
data/wmmixer-1.8/mixctl.cc:42:37:  [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.
	  mixer_devices_[count].name    = (char *) devnames[count];
data/wmmixer-1.8/mixctl.cc:43:37:  [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.
	  mixer_devices_[count].label   = (char *) devlabels[count];
data/wmmixer-1.8/wmmixer.cc:310:7:  [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).
	  if(atoi(optarg)>0)
data/wmmixer-1.8/wmmixer.cc:311:22:  [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).
	    wheel_scroll_ = atoi(optarg);
data/wmmixer-1.8/wmmixer.cc:321: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 buf[256];
data/wmmixer-1.8/wmmixer.cc:326:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if((rcfile=fopen(config_file_, "r"))!=NULL)
data/wmmixer-1.8/wmmixer.h:44: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     mixer_device_[256];
data/wmmixer-1.8/wmmixer.h:45: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     config_file_[CONFIGFILELEN];
data/wmmixer-1.8/xhandler.h:83: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 display_name_[256];
data/wmmixer-1.8/xhandler.h:84: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 position_name_[256];
data/wmmixer-1.8/xhandler.h:85: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 ledcolor_name_[256];
data/wmmixer-1.8/xhandler.h:86: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 ledcolor_high_name_[256];
data/wmmixer-1.8/xhandler.h:87: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 backcolor_name_[256];
data/wmmixer-1.8/xhandler.h:88: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 window_class_[256];
data/wmmixer-1.8/exception.cc:27: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).
      error_message_ = new char[strlen(other_message)+1];
data/wmmixer-1.8/mixctl.cc:18:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  device_ = new char[strlen(device_name)+1];
data/wmmixer-1.8/mixctl.cc:105:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int MixCtl::readVol(int dev, bool read)
data/wmmixer-1.8/mixctl.cc:107:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if(read)
data/wmmixer-1.8/mixctl.cc:170:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool MixCtl::readRec(int dev, bool read)
data/wmmixer-1.8/mixctl.cc:172:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if(read)
data/wmmixer-1.8/wmmixer.cc:106:7:  [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(100000);
data/wmmixer-1.8/wmmixer.cc:334:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	       buf[strlen(buf)-1]=0;
data/wmmixer-1.8/wmmixer.cc:335:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	       if(strncmp(buf, "addchannel ", strlen("addchannel "))==0)
data/wmmixer-1.8/wmmixer.cc:349:44:  [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(buf, "setchannel ", strlen("setchannel "))==0)
data/wmmixer-1.8/wmmixer.cc:358:41:  [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(buf, "setmono ", strlen("setmono "))==0)
data/wmmixer-1.8/wmmixer.cc:370:41:  [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(buf, "setleft ", strlen("setleft "))==0)
data/wmmixer-1.8/wmmixer.cc:381: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(strncmp(buf, "setright ", strlen("setright "))==0)
data/wmmixer-1.8/wmmixer.cc:393: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(strncmp(buf, "setrecsrc ", strlen("setrecsrc "))==0)
data/wmmixer-1.8/wmmixer.cc:398:57:  [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).
                  mixctl_->setRec(current, (strncmp(buf+strlen("setrecsrc "), "true", strlen("true"))==0));
data/wmmixer-1.8/wmmixer.cc:398:87:  [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).
                  mixctl_->setRec(current, (strncmp(buf+strlen("setrecsrc "), "true", strlen("true"))==0));
data/wmmixer-1.8/xhandler.cc:20:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
  strcpy(display_name_, "");
data/wmmixer-1.8/xhandler.cc:21:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
  strcpy(position_name_, "");

ANALYSIS SUMMARY:

Hits = 53
Lines analyzed = 1880 in approximately 0.05 seconds (37075 lines/second)
Physical Source Lines of Code (SLOC) = 1374
Hits@level = [0]  14 [1]  18 [2]  16 [3]   2 [4]  17 [5]   0
Hits@level+ = [0+]  67 [1+]  53 [2+]  35 [3+]  19 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 48.7627 [1+] 38.5735 [2+] 25.4731 [3+] 13.8282 [4+] 12.3726 [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.