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/mpt-status-1.2.0/contrib/sizes.c
Examining data/mpt-status-1.2.0/incl/config.h
Examining data/mpt-status-1.2.0/incl/header.h
Examining data/mpt-status-1.2.0/incl/mpt-sanitized.h
Examining data/mpt-status-1.2.0/incl/pci.h
Examining data/mpt-status-1.2.0/debian/includes/mptctl.h
Examining data/mpt-status-1.2.0/debian/includes/mpi_cnfg.h
Examining data/mpt-status-1.2.0/debian/includes/mpi_raid.h
Examining data/mpt-status-1.2.0/debian/includes/mpi_ioc.h
Examining data/mpt-status-1.2.0/debian/includes/mpi_type.h
Examining data/mpt-status-1.2.0/debian/includes/mpi.h
Examining data/mpt-status-1.2.0/mpt-status.h
Examining data/mpt-status-1.2.0/mpt-status.c

FINAL RESULTS:

data/mpt-status-1.2.0/incl/pci.h:143:22:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  struct pci_access *access;
data/mpt-status-1.2.0/mpt-status.c:232:11:  [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.
	result = vprintf(format, ap);
data/mpt-status-1.2.0/mpt-status.c:244:11:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	result = vfprintf(fp, format, ap);
data/mpt-status-1.2.0/mpt-status.c:257:11:  [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.
	result = vprintf(format, ap);
data/mpt-status-1.2.0/mpt-status.c:1098:12:  [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.
		status = system("/sbin/modprobe mptctl");
data/mpt-status-1.2.0/mpt-status.c:1130:17:  [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.
		next_option = getopt_long(argc, argv,
data/mpt-status-1.2.0/debian/includes/mptctl.h:187: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		 driverVersion[MPT_IOCTL_VERSION_LENGTH];	/* Driver Version (string) */
data/mpt-status-1.2.0/debian/includes/mptctl.h:190: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		 rsvd[2];
data/mpt-status-1.2.0/debian/includes/mptctl.h:205: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		 driverVersion[MPT_IOCTL_VERSION_LENGTH];	/* Driver Version (string) */
data/mpt-status-1.2.0/debian/includes/mptctl.h:208: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		 rsvd[2];
data/mpt-status-1.2.0/debian/includes/mptctl.h:227: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		 driverVersion[MPT_IOCTL_VERSION_LENGTH];	/* Driver Version (string) */
data/mpt-status-1.2.0/debian/includes/mptctl.h:230: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		 rsvd[2];
data/mpt-status-1.2.0/debian/includes/mptctl.h:330: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		MF[1];
data/mpt-status-1.2.0/debian/includes/mptctl.h:349: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	MF[1];
data/mpt-status-1.2.0/incl/mpt-sanitized.h:197: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 MF[1];
data/mpt-status-1.2.0/incl/pci.h: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 *method_params[PCI_ACCESS_MAX];	/* Parameters for the methods */
data/mpt-status-1.2.0/mpt-status.c:103:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char g_command[BIG];
data/mpt-status-1.2.0/mpt-status.c:104:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char  g_data[4*BIG];
data/mpt-status-1.2.0/mpt-status.c:105:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char  g_reply[BIG];
data/mpt-status-1.2.0/mpt-status.c:421:11:  [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		pdisk_vol[16];
data/mpt-status-1.2.0/mpt-status.c:907: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 vendor[BIG];
data/mpt-status-1.2.0/mpt-status.c:908: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 productid[BIG];
data/mpt-status-1.2.0/mpt-status.c:909: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 rev[BIG];
data/mpt-status-1.2.0/mpt-status.c:1010: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 vendor[BIG];
data/mpt-status-1.2.0/mpt-status.c:1011: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 productid[BIG];
data/mpt-status-1.2.0/mpt-status.c:1012: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 rev[BIG];
data/mpt-status-1.2.0/mpt-status.c:1104: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).
	m = open("/dev/mptctl", O_RDWR);
data/mpt-status-1.2.0/mpt-status.c:915:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(vendor, (void *) phys->InquiryData.VendorID,
data/mpt-status-1.2.0/mpt-status.c:917:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(productid, (void *) phys->InquiryData.ProductID,
data/mpt-status-1.2.0/mpt-status.c:919:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rev, (void *) phys->InquiryData.ProductRevLevel,
data/mpt-status-1.2.0/mpt-status.c:1018:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(vendor, (void *) phys->InquiryData.VendorID,
data/mpt-status-1.2.0/mpt-status.c:1020:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(productid, (void *) phys->InquiryData.ProductID,
data/mpt-status-1.2.0/mpt-status.c:1022:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rev, (void *) phys->InquiryData.ProductRevLevel,

ANALYSIS SUMMARY:

Hits = 33
Lines analyzed = 7408 in approximately 0.18 seconds (40667 lines/second)
Physical Source Lines of Code (SLOC) = 5154
Hits@level = [0]  29 [1]   6 [2]  21 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+]  62 [1+]  33 [2+]  27 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 12.0295 [1+] 6.40279 [2+] 5.23865 [3+] 1.16414 [4+] 0.97012 [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.