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/libmurmurhash-1.5/PMurHash.c Examining data/libmurmurhash-1.5/PMurHash.h Examining data/libmurmurhash-1.5/murmurhash.c Examining data/libmurmurhash-1.5/murmurhash.h Examining data/libmurmurhash-1.5/test/MurmurHash3.c Examining data/libmurmurhash-1.5/test/MurmurHash3.h Examining data/libmurmurhash-1.5/test/mmh.c Examining data/libmurmurhash-1.5/test/mmh_old.c FINAL RESULTS: data/libmurmurhash-1.5/test/mmh.c:93:2: [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. fprintf(exit_code == EXIT_SUCCESS ? stdout : stderr, str); data/libmurmurhash-1.5/test/mmh_old.c:93:2: [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. fprintf(exit_code == EXIT_SUCCESS ? stdout : stderr, str); data/libmurmurhash-1.5/test/mmh.c:26:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "h")) != -1) { data/libmurmurhash-1.5/test/mmh_old.c:26:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "h")) != -1) { data/libmurmurhash-1.5/murmurhash.c:17: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(out, &hash, sizeof(hash)); data/libmurmurhash-1.5/murmurhash.c:23: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(out, &hash, sizeof(hash)); data/libmurmurhash-1.5/murmurhash.c:45:11: [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. unsigned char data[sizeof(uint32_t)]; data/libmurmurhash-1.5/murmurhash.c:46: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(&data, addr + offset * sizeof(uint32_t), sizeof(uint32_t)); data/libmurmurhash-1.5/murmurhash.c:210:11: [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. unsigned char data[sizeof(uint64_t)]; data/libmurmurhash-1.5/murmurhash.c:211: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(&data, addr + offset * sizeof(uint64_t), sizeof(uint64_t)); data/libmurmurhash-1.5/murmurhash.c:326: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(out, &buffer, sizeof(buffer)); data/libmurmurhash-1.5/murmurhash.c:333: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(out, buffer, sizeof(buffer)); data/libmurmurhash-1.5/murmurhash.c:340: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(out, buffer, sizeof(buffer)); data/libmurmurhash-1.5/test/mmh.c:43:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(file_name, O_RDONLY); data/libmurmurhash-1.5/test/mmh_old.c:43:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(file_name, O_RDONLY); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 1421 in approximately 0.08 seconds (18064 lines/second) Physical Source Lines of Code (SLOC) = 937 Hits@level = [0] 12 [1] 0 [2] 11 [3] 2 [4] 2 [5] 0 Hits@level+ = [0+] 27 [1+] 15 [2+] 15 [3+] 4 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 28.8154 [1+] 16.0085 [2+] 16.0085 [3+] 4.26894 [4+] 2.13447 [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.