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/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c
Examining data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/element3.c
Examining data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/functools.c
Examining data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/module.c
Examining data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/structlib.c
Examining data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/wirestate.c

FINAL RESULTS:

data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:184: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(dst, src, this_read);
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:202: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 header[5];
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:220: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(&msg_length, header + 1, 4);
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:250: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 header[5];
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:263: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_length, header + 1, 4);
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:452: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 header[5];
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/buffer.c:470: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_length, header + 1, 4);
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/element3.c:115:24:  [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 const unsigned char null_sequence[4] = {0xFF, 0xFF, 0xFF, 0xFF};
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/element3.c:121: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 attsize_buf[4];
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/element3.c:332:15:  [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.
	const static char null_attribute[4] = {0xff,0xff,0xff,0xff};
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/wirestate.c:10: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 size_fragment[4];				/* the header fragment; continuation specifies bytes read so far. */
data/py-postgresql-1.2.1+git20180803.ef7b9a9/postgresql/port/_optimized/wirestate.c:52: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 size_fragment[4];

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 2701 in approximately 0.10 seconds (27943 lines/second)
Physical Source Lines of Code (SLOC) = 2024
Hits@level = [0]   0 [1]   0 [2]  12 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  12 [1+]  12 [2+]  12 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.92885 [1+] 5.92885 [2+] 5.92885 [3+]   0 [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.