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/fxload-0.0.20081013/ezusb.c
Examining data/fxload-0.0.20081013/ezusb.h
Examining data/fxload-0.0.20081013/main.c

FINAL RESULTS:

data/fxload-0.0.20081013/main.c:259:15:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    int rc = chmod(device_path, mode);
data/fxload-0.0.20081013/ezusb.c:38:29:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format (printf, 1, 2)));
data/fxload-0.0.20081013/main.c:85:2:  [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.
	vfprintf(stderr, format, ap);
data/fxload-0.0.20081013/main.c:93:33:  [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.
      const char	*device_path = getenv("DEVICE");
data/fxload-0.0.20081013/main.c:100:21:  [3] (buffer) getopt:
  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 ((opt = getopt (argc, argv, "2vV?D:I:L:c:lm:s:t:")) != EOF)
data/fxload-0.0.20081013/ezusb.c:303: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	data [1023];
data/fxload-0.0.20081013/ezusb.c:321: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		buf [512], *cp;
data/fxload-0.0.20081013/ezusb.c:536: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).
    image = fopen (path, "r");
data/fxload-0.0.20081013/ezusb.c:631: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	header [4];
data/fxload-0.0.20081013/ezusb.c:695: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).
    image = fopen (path, "r");
data/fxload-0.0.20081013/main.c:200: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).
	    int fd = open(device_path, O_RDWR);
data/fxload-0.0.20081013/ezusb.c:385: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).
	if ((len * 2) + 11 > strlen(buf)) {

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 1260 in approximately 0.06 seconds (20765 lines/second)
Physical Source Lines of Code (SLOC) = 701
Hits@level = [0]   1 [1]   1 [2]   6 [3]   2 [4]   2 [5]   1
Hits@level+ = [0+]  13 [1+]  12 [2+]  11 [3+]   5 [4+]   3 [5+]   1
Hits/KSLOC@level+ = [0+] 18.5449 [1+] 17.1184 [2+] 15.6919 [3+] 7.13267 [4+] 4.2796 [5+] 1.42653
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.