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/pg-wait-sampling-1.1.1/collector.c Examining data/pg-wait-sampling-1.1.1/compat.c Examining data/pg-wait-sampling-1.1.1/pg_wait_sampling.c Examining data/pg-wait-sampling-1.1.1/pg_wait_sampling.h FINAL RESULTS: data/pg-wait-sampling-1.1.1/collector.c:47:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(worker.bgw_function_name, BGW_MAXLEN, CppAsString(collector_main)); data/pg-wait-sampling-1.1.1/collector.c:96: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(&newitems[i], &observations->items[j], sizeof(HistoryItem)); data/pg-wait-sampling-1.1.1/pg_wait_sampling.c:537: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(count, data, sizeof(*count)); data/pg-wait-sampling-1.1.1/pg_wait_sampling.c:550: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, data, item_size); ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 1433 in approximately 0.07 seconds (20785 lines/second) Physical Source Lines of Code (SLOC) = 1044 Hits@level = [0] 2 [1] 0 [2] 3 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 6 [1+] 4 [2+] 4 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 5.74713 [1+] 3.83142 [2+] 3.83142 [3+] 0.957854 [4+] 0.957854 [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.