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/gst123-0.3.5/src/keyhandler.h
Examining data/gst123-0.3.5/src/playlist.cc
Examining data/gst123-0.3.5/src/msg.cc
Examining data/gst123-0.3.5/src/utils.cc
Examining data/gst123-0.3.5/src/glib-extra.c
Examining data/gst123-0.3.5/src/gst123.cc
Examining data/gst123-0.3.5/src/m3uparser.cc
Examining data/gst123-0.3.5/src/compat.cc
Examining data/gst123-0.3.5/src/visualization.h
Examining data/gst123-0.3.5/src/compat.h
Examining data/gst123-0.3.5/src/httpstream.cc
Examining data/gst123-0.3.5/src/utils.h
Examining data/gst123-0.3.5/src/visualization.cc
Examining data/gst123-0.3.5/src/plsparser.h
Examining data/gst123-0.3.5/src/microconf.cc
Examining data/gst123-0.3.5/src/configfile.cc
Examining data/gst123-0.3.5/src/playlist.h
Examining data/gst123-0.3.5/src/terminal.cc
Examining data/gst123-0.3.5/src/iostream.cc
Examining data/gst123-0.3.5/src/uri.cc
Examining data/gst123-0.3.5/src/m3uparser.h
Examining data/gst123-0.3.5/src/iostream.h
Examining data/gst123-0.3.5/src/glib-extra.h
Examining data/gst123-0.3.5/src/uri.h
Examining data/gst123-0.3.5/src/gtkinterface.cc
Examining data/gst123-0.3.5/src/gtkinterface.h
Examining data/gst123-0.3.5/src/consolestream.cc
Examining data/gst123-0.3.5/src/filestream.cc
Examining data/gst123-0.3.5/src/microconf.h
Examining data/gst123-0.3.5/src/configfile.h
Examining data/gst123-0.3.5/src/networkstream.cc
Examining data/gst123-0.3.5/src/options.cc
Examining data/gst123-0.3.5/src/msg.h
Examining data/gst123-0.3.5/src/terminal.h
Examining data/gst123-0.3.5/src/typefinder.cc
Examining data/gst123-0.3.5/src/typefinder.h
Examining data/gst123-0.3.5/src/options.h
Examining data/gst123-0.3.5/src/plsparser.cc

FINAL RESULTS:

data/gst123-0.3.5/src/gst123.cc:80:16:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  FILE *cols = popen ("tput cols", "r");
data/gst123-0.3.5/src/gtkinterface.cc:449:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      int rc = system (cmd);   // don't complain if xdg-screensaver is not installed
data/gst123-0.3.5/src/httpstream.cc:99:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    sscanf (line.c_str(), "%s %d %s", mode, &status, message);
data/gst123-0.3.5/src/msg.cc:43:7:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vprintf (format, args);
data/gst123-0.3.5/src/configfile.cc:51:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *home = getenv ("HOME");
data/gst123-0.3.5/src/gst123.cc:337:27:  [3] (random) g_random_int_range:
  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.
                guint j = g_random_int_range (i, uris.size());
data/gst123-0.3.5/src/options.cc:83:45:  [3] (random) random:
  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.
    {"random",  'Z', 0, G_OPTION_ARG_NONE, &random,
data/gst123-0.3.5/src/options.cc:124:7:  [3] (random) random:
  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 (random)
data/gst123-0.3.5/src/terminal.cc:131:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  termtype = getenv ("TERM");
data/gst123-0.3.5/src/filestream.cc:51: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 (path.c_str(), O_RDONLY);
data/gst123-0.3.5/src/gst123.cc:81: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  col_buffer[50];
data/gst123-0.3.5/src/gst123.cc:85:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      int c = atoi (col_buffer);
data/gst123-0.3.5/src/gst123.cc:574: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 outstr[200];
data/gst123-0.3.5/src/httpstream.cc:89: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 mode[8];
data/gst123-0.3.5/src/httpstream.cc:90: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 message[256];
data/gst123-0.3.5/src/iostream.cc:66:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf [4096];
data/gst123-0.3.5/src/microconf.cc:28:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  cfg_file = fopen (filename.c_str(), "r");
data/gst123-0.3.5/src/microconf.cc:60: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 s[1024];
data/gst123-0.3.5/src/microconf.cc:172:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  arg = atoi (token.c_str());
data/gst123-0.3.5/src/networkstream.cc:56: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 port_str[10];
data/gst123-0.3.5/src/playlist.cc:41: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).
  error = uri.open();
data/gst123-0.3.5/src/terminal.cc:40: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 term_buffer[4096];
data/gst123-0.3.5/src/terminal.cc:41: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 term_buffer2[4096];
data/gst123-0.3.5/src/terminal.cc:170: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[1024];
data/gst123-0.3.5/src/uri.cc:87:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      port = atoi (port_str.c_str());
data/gst123-0.3.5/src/uri.cc:121: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).
URI::open()
data/gst123-0.3.5/src/uri.h:61:7:  [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 open();
data/gst123-0.3.5/src/httpstream.cc:72: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).
  int ret = write (fd, buf, strlen (buf));
data/gst123-0.3.5/src/iostream.cc:74:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          len = read (fd, buf, sizeof (buf) - 1);
data/gst123-0.3.5/src/terminal.cc:171:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int r = read (0, buffer, 1024);

ANALYSIS SUMMARY:

Hits = 30
Lines analyzed = 5004 in approximately 0.16 seconds (31808 lines/second)
Physical Source Lines of Code (SLOC) = 3376
Hits@level = [0]  34 [1]   3 [2]  18 [3]   5 [4]   4 [5]   0
Hits@level+ = [0+]  64 [1+]  30 [2+]  27 [3+]   9 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 18.9573 [1+] 8.88626 [2+] 7.99763 [3+] 2.66588 [4+] 1.18483 [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.