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/fbterm-ucimf-0.2.9/immessage.h
Examining data/fbterm-ucimf-0.2.9/imapi.h
Examining data/fbterm-ucimf-0.2.9/imapi.c
Examining data/fbterm-ucimf-0.2.9/fbterm_ucimf.cpp

FINAL RESULTS:

data/fbterm-ucimf-0.2.9/imapi.c:50:15:  [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.
		char *val = getenv("FBTERM_IM_SOCKET");
data/fbterm-ucimf-0.2.9/imapi.c:33:8:  [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.
static char pending_msg_buf[10240];
data/fbterm-ucimf-0.2.9/imapi.c:77: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[OFFSET(Message, texts) + len];
data/fbterm-ucimf-0.2.9/imapi.c:81: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(MSG(buf)->texts, text, len);
data/fbterm-ucimf-0.2.9/imapi.c:116: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[OFFSET(Message, drawText.texts) + len];
data/fbterm-ucimf-0.2.9/imapi.c:125: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(MSG(buf)->drawText.texts, text, len);
data/fbterm-ucimf-0.2.9/imapi.c:235: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(cur, cur + MSG(cur)->len, end - cur - MSG(cur)->len);
data/fbterm-ucimf-0.2.9/imapi.c:256: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[sizeof(pending_msg_buf)];
data/fbterm-ucimf-0.2.9/imapi.c:263: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(buf, pending_msg_buf, len);
data/fbterm-ucimf-0.2.9/immessage.h:168: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 keys[0]; ///< included in message SendKey
data/fbterm-ucimf-0.2.9/immessage.h:169: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 texts[0]; ///< included in message PutText
data/fbterm-ucimf-0.2.9/immessage.h:197:4:  [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 texts[0];
data/fbterm-ucimf-0.2.9/imapi.c:221:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int len = read(imfd, cur, sizeof(pending_msg_buf) - pending_msg_buf_len);
data/fbterm-ucimf-0.2.9/imapi.c:267:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(imfd, buf, sizeof(buf));

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 734 in approximately 0.12 seconds (6049 lines/second)
Physical Source Lines of Code (SLOC) = 369
Hits@level = [0]   0 [1]   2 [2]  11 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  14 [1+]  14 [2+]  12 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 37.9404 [1+] 37.9404 [2+] 32.5203 [3+] 2.71003 [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.