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/dpaste-0.4.0/src/aescrypto.cpp Examining data/dpaste-0.4.0/src/aescrypto.h Examining data/dpaste-0.4.0/src/bin.cpp Examining data/dpaste-0.4.0/src/bin.h Examining data/dpaste-0.4.0/src/cipher.cpp Examining data/dpaste-0.4.0/src/cipher.h Examining data/dpaste-0.4.0/src/conf.cpp Examining data/dpaste-0.4.0/src/conf.h Examining data/dpaste-0.4.0/src/gpgcrypto.cpp Examining data/dpaste-0.4.0/src/gpgcrypto.h Examining data/dpaste-0.4.0/src/http_client.h Examining data/dpaste-0.4.0/src/log.cpp Examining data/dpaste-0.4.0/src/log.h Examining data/dpaste-0.4.0/src/main.cpp Examining data/dpaste-0.4.0/src/node.cpp Examining data/dpaste-0.4.0/src/node.h Examining data/dpaste-0.4.0/src/http_client.cpp Examining data/dpaste-0.4.0/tests/aes.cpp Examining data/dpaste-0.4.0/tests/bin.cpp Examining data/dpaste-0.4.0/tests/conf.cpp Examining data/dpaste-0.4.0/tests/node.cpp Examining data/dpaste-0.4.0/tests/tests.cpp Examining data/dpaste-0.4.0/tests/tests.h FINAL RESULTS: data/dpaste-0.4.0/src/log.cpp:35:15: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int ret = vsnprintf(buffer.data(), buffer.size(), m, args); data/dpaste-0.4.0/src/main.cpp:67:19: [3] (buffer) getopt_long: 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_long(argc, argv, "hvg:r:s", long_options, nullptr)) != -1) { data/dpaste-0.4.0/src/bin.cpp:115:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). input_stream.read(reinterpret_cast<char*>(buffer.data()), dht::MAX_VALUE_SIZE); data/dpaste-0.4.0/src/gpgcrypto.cpp:43:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((bytes = d.read(buf.data(), BUFLEN)) > 0) ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 2118 in approximately 0.10 seconds (20361 lines/second) Physical Source Lines of Code (SLOC) = 1183 Hits@level = [0] 0 [1] 2 [2] 0 [3] 1 [4] 1 [5] 0 Hits@level+ = [0+] 4 [1+] 4 [2+] 2 [3+] 2 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 3.38123 [1+] 3.38123 [2+] 1.69062 [3+] 1.69062 [4+] 0.845309 [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.