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/tdigest-1.0.1/tdigest.c

FINAL RESULTS:

data/tdigest-1.0.1/tdigest.c:314: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(state->centroids, centroids, sizeof(centroid_t) * state->ncentroids);
data/tdigest-1.0.1/tdigest.c:857:4:  [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(state->percentiles, percentiles, sizeof(double) * npercentiles);
data/tdigest-1.0.1/tdigest.c:922:4:  [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(state->values, values, sizeof(double) * nvalues);
data/tdigest-1.0.1/tdigest.c:995:4:  [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(state->percentiles, percentiles, sizeof(double) * npercentiles);
data/tdigest-1.0.1/tdigest.c:1069:4:  [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(state->values, values, sizeof(double) * nvalues);
data/tdigest-1.0.1/tdigest.c:1133: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(state->percentiles, percentiles, sizeof(double) * npercentiles);
data/tdigest-1.0.1/tdigest.c:1193: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(state->values, values, sizeof(double) * nvalues);
data/tdigest-1.0.1/tdigest.c:1260: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(state->percentiles, percentiles, sizeof(double) * npercentiles);
data/tdigest-1.0.1/tdigest.c:1327: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(state->values, values, sizeof(double) * nvalues);
data/tdigest-1.0.1/tdigest.c:1496: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(ptr, state, offsetof(tdigest_aggstate_t, percentiles));
data/tdigest-1.0.1/tdigest.c:1501: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(ptr, state->percentiles, sizeof(double) * state->npercentiles);
data/tdigest-1.0.1/tdigest.c:1507: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(ptr, state->values, sizeof(double) * state->nvalues);
data/tdigest-1.0.1/tdigest.c:1512: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(ptr, state->centroids,
data/tdigest-1.0.1/tdigest.c:1532: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(&tmp, ptr, offsetof(tdigest_aggstate_t, percentiles));
data/tdigest-1.0.1/tdigest.c:1539: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(percentiles, ptr, tmp.npercentiles * sizeof(double));
data/tdigest-1.0.1/tdigest.c:1547: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(values, ptr, tmp.nvalues * sizeof(double));
data/tdigest-1.0.1/tdigest.c:1556: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(state->percentiles, percentiles, tmp.npercentiles * sizeof(double));
data/tdigest-1.0.1/tdigest.c:1562: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(state->values, values, tmp.nvalues * sizeof(double));
data/tdigest-1.0.1/tdigest.c:1567: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(state, &tmp, offsetof(tdigest_aggstate_t, percentiles));
data/tdigest-1.0.1/tdigest.c:1571: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(state->centroids, ptr,
data/tdigest-1.0.1/tdigest.c:1586: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(copy, state, offsetof(tdigest_aggstate_t, percentiles));
data/tdigest-1.0.1/tdigest.c:1589: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(copy->values, state->values,
data/tdigest-1.0.1/tdigest.c:1593: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(copy->percentiles, state->percentiles,
data/tdigest-1.0.1/tdigest.c:1596: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(copy->centroids, state->centroids,
data/tdigest-1.0.1/tdigest.c:1646: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(&dst->centroids[dst->ncentroids],
data/tdigest-1.0.1/tdigest.c:1767:22:  [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).
	Assert(ptr == str + strlen(str));

ANALYSIS SUMMARY:

Hits = 26
Lines analyzed = 1963 in approximately 0.06 seconds (32355 lines/second)
Physical Source Lines of Code (SLOC) = 1211
Hits@level = [0]   2 [1]   1 [2]  25 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  28 [1+]  26 [2+]  25 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 23.1214 [1+] 21.4699 [2+] 20.6441 [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.