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-ed25519-1.2.4/ext/ed25519_ref10/sc.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sqrtm1.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge_madd.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/d.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sign.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/base2.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ed25519_ref10.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge_p2_dbl.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge_add.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/api.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/base.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/fe.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sc_reduce.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ed25519_ref10.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/keypair.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/open.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/d2.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/fe.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/pow22523.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge_sub.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/verify.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sc_muladd.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sha512.c Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge_msub.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sha512.h Examining data/ruby-ed25519-1.2.4/ext/ed25519_ref10/pow225521.h FINAL RESULTS: data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ed25519_ref10.c:86: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(sig_and_msg, RSTRING_PTR(signature), SIGNATUREBYTES); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ed25519_ref10.c:87: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(sig_and_msg + SIGNATUREBYTES, RSTRING_PTR(msg), RSTRING_LEN(msg)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/fe.c:279:12: [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 s[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/fe.c:292:23: [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 const unsigned char zero[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/fe.c:296:12: [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 s[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:58:10: [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. signed char aslide[256]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:59:10: [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. signed char bslide[256]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/open.c:13:12: [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 pkcopy[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/open.c:14:12: [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 rcopy[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/open.c:15:12: [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 scopy[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/open.c:16:12: [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 h[64]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/open.c:17:12: [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 rcheck[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sign.c:13:12: [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 pk[32]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sign.c:14:12: [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 az[64]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sign.c:15:12: [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 nonce[64]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/sign.c:16:12: [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 hram[64]; data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:283:16: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. static uint8_t equal(int8_t b,int8_t c) data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:320:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][0],equal(babs,1)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:321:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][1],equal(babs,2)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:322:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][2],equal(babs,3)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:323:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][3],equal(babs,4)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:324:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][4],equal(babs,5)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:325:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][5],equal(babs,6)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:326:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][6],equal(babs,7)); data/ruby-ed25519-1.2.4/ext/ed25519_ref10/ge.c:327:24: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. cmov(t,&base[pos][7],equal(babs,8)); ANALYSIS SUMMARY: Hits = 25 Lines analyzed = 5046 in approximately 0.21 seconds (24356 lines/second) Physical Source Lines of Code (SLOC) = 3789 Hits@level = [0] 0 [1] 9 [2] 16 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 25 [1+] 25 [2+] 16 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 6.59805 [1+] 6.59805 [2+] 4.22275 [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.