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/rig-1.11/rig.cc FINAL RESULTS: data/rig-1.11/rig.cc:55:2: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL) ^ (((unsigned int) getpid()) << 15)); data/rig-1.11/rig.cc:66: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(buf+written, &tmp, bytestocopy); data/rig-1.11/rig.cc:40:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). urandev.read((char*)&rval, sizeof(rval)); data/rig-1.11/rig.cc:48:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). randev.read(&rval, sizeof(rval)); ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 308 in approximately 0.02 seconds (19028 lines/second) Physical Source Lines of Code (SLOC) = 245 Hits@level = [0] 0 [1] 2 [2] 1 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 4 [1+] 4 [2+] 2 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 16.3265 [1+] 16.3265 [2+] 8.16327 [3+] 4.08163 [4+] 0 [5+] 0 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.