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/libopkele-2.0.4+git20140305.9651b55/include/opkele/association.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/ax.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/basic_op.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/basic_rp.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/curl.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/data.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/debug.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/discovery.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/exception.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/expat.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/extension.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/extension_chain.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/iterator.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/oauth_ext.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/opkele-config.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/prequeue_rp.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/sreg.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/tidy.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/types.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/uris.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/util-internal.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/util.h Examining data/libopkele-2.0.4+git20140305.9651b55/include/opkele/verify_op.h Examining data/libopkele-2.0.4+git20140305.9651b55/lib/ax.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/curl.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/data.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/discovery.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/exception.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/expat.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/extension.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/extension_chain.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/fields.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/message.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/oauth_ext.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/params.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/prequeue_rp.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/secret.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/sreg.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/verify_op.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/basic_op.cc Examining data/libopkele-2.0.4+git20140305.9651b55/lib/basic_rp.cc Examining data/libopkele-2.0.4+git20140305.9651b55/test/OP.cc Examining data/libopkele-2.0.4+git20140305.9651b55/test/RP.cc Examining data/libopkele-2.0.4+git20140305.9651b55/test/idiscover.cc Examining data/libopkele-2.0.4+git20140305.9651b55/test/kingate_openid_message.h Examining data/libopkele-2.0.4+git20140305.9651b55/test/sqlite.h Examining data/libopkele-2.0.4+git20140305.9651b55/test/test.cc FINAL RESULTS: data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:127:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *tz = getenv("TZ"); data/libopkele-2.0.4+git20140305.9651b55/lib/basic_op.cc:70: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 key_digest[SHA256_DIGEST_LENGTH]; data/libopkele-2.0.4+git20140305.9651b55/lib/basic_op.cc:213:2: [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. char w3timestr[24]; data/libopkele-2.0.4+git20140305.9651b55/lib/basic_rp.cc:51: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 key_digest[SHA256_DIGEST_LENGTH]; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:70: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 tmp[512]; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:119:6: [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. char rv[25]; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:195:4: [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. char tmp[4]; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:213:6: [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. char tmp[3]; tmp[2] = 0; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:257:6: [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. char rv[32]; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:330:8: [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. char tmp[8]; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:344:7: [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. char tmp[3] = { 0,0,0 }; data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:494:15: [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 md[SHA256_DIGEST_LENGTH]; data/libopkele-2.0.4+git20140305.9651b55/test/test.cc:84:2: [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. char tmp[512]; snprintf(tmp,sizeof(tmp)-1, data/libopkele-2.0.4+git20140305.9651b55/lib/discovery.cc:47:11: [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). int nl = strlen(n), enl = strlen(en); data/libopkele-2.0.4+git20140305.9651b55/lib/discovery.cc:47:28: [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). int nl = strlen(n), enl = strlen(en); data/libopkele-2.0.4+git20140305.9651b55/lib/util.cc:446:41: [1] (buffer) mismatch: 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. pair<const char*,const char*> mp = mismatch( ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 6778 in approximately 0.31 seconds (21519 lines/second) Physical Source Lines of Code (SLOC) = 4955 Hits@level = [0] 8 [1] 3 [2] 12 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 24 [1+] 16 [2+] 13 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.84359 [1+] 3.22906 [2+] 2.62361 [3+] 0.201816 [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.