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/ruby-bcrypt-pbkdf-1.0.1/ext/mri/crypto_api.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/blowfish.c Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/explicit_bzero.c Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/utils.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/util.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/includes.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/sha2.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/blf.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.c Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/crypto_hash_sha512.h Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/bcrypt_pbkdf.c Examining data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c FINAL RESULTS: data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/crypto_hash_sha512.h:6:14: [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 buf[128]; data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:111:50: [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. SHA512_Transform(uint64_t *state, const unsigned char block[128]) data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:123:5: [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(S, state, 64); data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:216:17: [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 unsigned char PAD[128] = { data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:230:14: [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 len[16]; data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:253:5: [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->state, sha512_initstate, sizeof sha512_initstate); data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:280:9: [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->buf[r], src, inlen); data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:283:5: [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->buf[r], src, 128 - r); data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/hash_sha512.c:293:5: [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->buf, src, inlen); /* inlen < 128 */ data/ruby-bcrypt-pbkdf-1.0.1/ext/mri/blowfish.c:691:33: [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). blf_key(&c, (u_int8_t *) key2, strlen(key2)); ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 1401 in approximately 0.06 seconds (21690 lines/second) Physical Source Lines of Code (SLOC) = 1062 Hits@level = [0] 3 [1] 1 [2] 9 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 13 [1+] 10 [2+] 9 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 12.2411 [1+] 9.4162 [2+] 8.47458 [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.