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/kwalletcli-3.02/charconv.c
Examining data/kwalletcli-3.02/kwalletcli.h
Examining data/kwalletcli-3.02/kwif3.cc
Examining data/kwalletcli-3.02/kwif4.cc
Examining data/kwalletcli-3.02/kwif5.cc
Examining data/kwalletcli-3.02/main.c

FINAL RESULTS:

data/kwalletcli-3.02/main.c:171:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, fmts, kw_folder);
data/kwalletcli-3.02/main.c:184:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, fmts, kw_entry, kw_folder);
data/kwalletcli-3.02/kwif3.cc:31:18:  [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.
extern "C" char *getenv(const char *);
data/kwalletcli-3.02/kwif3.cc:49:22:  [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.
	if (!(env_DISPLAY = getenv("DISPLAY")) || !*env_DISPLAY)
data/kwalletcli-3.02/kwif4.cc:33:18:  [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.
extern "C" char *getenv(const char *);
data/kwalletcli-3.02/kwif4.cc:51:22:  [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.
	if (!(env_DISPLAY = getenv("DISPLAY")) || !*env_DISPLAY)
data/kwalletcli-3.02/kwif5.cc:36:18:  [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.
extern "C" char *getenv(const char *);
data/kwalletcli-3.02/kwif5.cc:54:22:  [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.
	if (!(env_DISPLAY = getenv("DISPLAY")) || !*env_DISPLAY)
data/kwalletcli-3.02/main.c:44:15:  [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 ((ch = getopt(argc, argv, "e:f:hPp:qV")) != -1) {
data/kwalletcli-3.02/main.c:60:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				cnt = read(STDIN_FILENO, cp, n);
data/kwalletcli-3.02/main.c:107:26:  [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 ((dst = cp = malloc(strlen(kw_pass) * 3 + 1)) == NULL)
data/kwalletcli-3.02/main.c:137:26:  [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 ((dst = cp = malloc(strlen(kw_pass) + 1)) == NULL)

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 709 in approximately 0.22 seconds (3199 lines/second)
Physical Source Lines of Code (SLOC) = 467
Hits@level = [0]   5 [1]   3 [2]   0 [3]   7 [4]   2 [5]   0
Hits@level+ = [0+]  17 [1+]  12 [2+]   9 [3+]   9 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 36.4026 [1+] 25.6959 [2+] 19.2719 [3+] 19.2719 [4+] 4.28266 [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.