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/indexed-gzip-0.8.6/compat/stdint.h Examining data/indexed-gzip-0.8.6/indexed_gzip/zran.c Examining data/indexed-gzip-0.8.6/indexed_gzip/zran.h FINAL RESULTS: data/indexed-gzip-0.8.6/indexed_gzip/zran.c:59:23: [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. #define zran_log(...) fprintf(stderr, __VA_ARGS__) data/indexed-gzip-0.8.6/indexed_gzip/zran.c:991:13: [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(point_data, data + (data_offset - index->window_size), index->window_size); data/indexed-gzip-0.8.6/indexed_gzip/zran.c:999:13: [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(point_data, data/indexed-gzip-0.8.6/indexed_gzip/zran.c:1003:13: [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(point_data + (index->window_size - data_offset), data/indexed-gzip-0.8.6/indexed_gzip/zran.c:1417:17: [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(index->readbuf, strm->next_in, strm->avail_in); data/indexed-gzip-0.8.6/indexed_gzip/zran.c:2575:5: [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 magic_bytes[sizeof(zran_magic_bytes)]; data/indexed-gzip-0.8.6/indexed_gzip/zran.c:1102:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = getc(index->fd); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 3508 in approximately 0.19 seconds (18770 lines/second) Physical Source Lines of Code (SLOC) = 1495 Hits@level = [0] 11 [1] 1 [2] 5 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 18 [1+] 7 [2+] 6 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 12.0401 [1+] 4.68227 [2+] 4.01338 [3+] 0.668896 [4+] 0.668896 [5+] 0 Dot directories skipped = 2 (--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.