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/libbase58-0.1.4/base58.c
Examining data/libbase58-0.1.4/clitool.c
Examining data/libbase58-0.1.4/libbase58.h

FINAL RESULTS:

data/libbase58-0.1.4/clitool.c:41:17:  [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, "cd:h")) != -1)
data/libbase58-0.1.4/base58.c:124: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 buf[32];
data/libbase58-0.1.4/base58.c:193:2:  [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(&buf[1], data, datasz);
data/libbase58-0.1.4/clitool.c:51:13:  [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 i = atoi(optarg);
data/libbase58-0.1.4/clitool.c:108:5:  [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(&cbin[zeros], bin, decode);
data/libbase58-0.1.4/clitool.c:111:5:  [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(cbin, &bin[decode - ssz], ssz);
data/libbase58-0.1.4/clitool.c:120: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[ssz];
data/libbase58-0.1.4/base58.c:50:11:  [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).
		b58sz = strlen(b58);
data/libbase58-0.1.4/clitool.c:83:8:  [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).
		rt = strlen(argv[optind]);

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 354 in approximately 0.07 seconds (5265 lines/second)
Physical Source Lines of Code (SLOC) = 288
Hits@level = [0]   4 [1]   2 [2]   6 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  13 [1+]   9 [2+]   7 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 45.1389 [1+] 31.25 [2+] 24.3056 [3+] 3.47222 [4+]   0 [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.