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/bluemon-1.4/bluemon-query.c
Examining data/bluemon-1.4/bluemon-client.c
Examining data/bluemon-1.4/bluetooth-monitor.c

FINAL RESULTS:

data/bluemon-1.4/bluemon-client.c:58:4:  [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(msg, vargs);
data/bluemon-1.4/bluemon-client.c:81:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      system(cmd);
data/bluemon-1.4/bluetooth-monitor.c:522: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(msg, vargs);
data/bluemon-1.4/bluemon-client.c:221:22:  [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 (-1 != (c = getopt_long(argc, argv, "-u:d:b:hVvp",long_opts, &idx))) {
data/bluemon-1.4/bluetooth-monitor.c:432:22:  [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 (-1 != (c = getopt_long(argc, argv, "-c:b:t:i:o:sqhVndvag:u:",long_opts, &idx))) {
data/bluemon-1.4/bluemon-client.c:202: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 s[30];
data/bluemon-1.4/bluetooth-monitor.c:441:31:  [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).
            args->threshold = atoi(optarg);
data/bluemon-1.4/bluetooth-monitor.c:444:30:  [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).
            args->interval = atoi(optarg);
data/bluemon-1.4/bluetooth-monitor.c:447: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).
            args->uid = atoi(optarg);
data/bluemon-1.4/bluetooth-monitor.c:450: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).
            args->gid = atoi(optarg);
data/bluemon-1.4/bluetooth-monitor.c:564:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   fd = fopen("/var/run/bluemon.pid", "w");
data/bluemon-1.4/bluemon-client.c:278:56:  [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 (0 == strncasecmp(btid, sigvalue, strlen(btid)))
data/bluemon-1.4/bluemon-client.c:298:56:  [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 (0 == strncasecmp(btid, sigvalue, strlen(btid)))
data/bluemon-1.4/bluetooth-monitor.c:655:82:  [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 (0 == strncmp("", address, 1) || 0 == strncasecmp(btdev->btid, address, strlen(btdev->btid))) {
data/bluemon-1.4/bluetooth-monitor.c:756:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
         umask(0);

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 1291 in approximately 0.05 seconds (26579 lines/second)
Physical Source Lines of Code (SLOC) = 1015
Hits@level = [0]  33 [1]   4 [2]   6 [3]   2 [4]   3 [5]   0
Hits@level+ = [0+]  48 [1+]  15 [2+]  11 [3+]   5 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 47.2906 [1+] 14.7783 [2+] 10.8374 [3+] 4.92611 [4+] 2.95567 [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.