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/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c
Examining data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.h
Examining data/libusb3380-0.0.1+git20190125.c83d1e9/test_libusb3380.c
Examining data/libusb3380-0.0.1+git20190125.c83d1e9/usb3380.h
Examining data/libusb3380-0.0.1+git20190125.c83d1e9/xtrx_port.h

FINAL RESULTS:

data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:151:56:  [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.
					const char* message, ...) __attribute__ ((format (printf, 6, 7)));
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:175:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(tmp_buf, sizeof(tmp_buf), message, ap);
data/libusb3380-0.0.1+git20190125.c83d1e9/xtrx_port.h:72:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(__mutex);
data/libusb3380-0.0.1+git20190125.c83d1e9/xtrx_port.h:82:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(__mutex);
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:171: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 tmp_buf[1024];
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:507:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(pciout->out.data, data, dw_count * 4);
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:539:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(data, pciout->data, dw_count * 4);
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:1093:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&tmp[2], pcidata, 4 * pcidata_size_dw);
data/libusb3380-0.0.1+git20190125.c83d1e9/test_libusb3380.c:42: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).
		bus = atoi(argv[1]);
data/libusb3380-0.0.1+git20190125.c83d1e9/test_libusb3380.c:45: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).
		dev = atoi(argv[2]);
data/libusb3380-0.0.1+git20190125.c83d1e9/test_libusb3380.c:48:10:  [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).
		func = atoi(argv[3]);
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.c:1363:3:  [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(1000);
data/libusb3380-0.0.1+git20190125.c83d1e9/libusb3380.h:264:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bool read;
data/libusb3380-0.0.1+git20190125.c83d1e9/xtrx_port.h:127:5:  [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.
int usleep(unsigned usec);

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 3146 in approximately 0.07 seconds (47474 lines/second)
Physical Source Lines of Code (SLOC) = 2383
Hits@level = [0]   5 [1]   3 [2]   7 [3]   2 [4]   2 [5]   0
Hits@level+ = [0+]  19 [1+]  14 [2+]  11 [3+]   4 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 7.97314 [1+] 5.87495 [2+] 4.61603 [3+] 1.67856 [4+] 0.839278 [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.