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/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c Examining data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils_error.c Examining data/globus-gsi-cert-utils-10.3/library/globus_i_gsi_cert_utils.h Examining data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.h Examining data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils_constants.h Examining data/globus-gsi-cert-utils-10.3/test/globus-gsi-cert-utils-get-x509-name-test.c FINAL RESULTS: data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:75:47: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). globus_i_gsi_cert_utils_debug_level = atoi(tmp_string); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:86:49: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). globus_i_gsi_cert_utils_debug_fstream = fopen(tmp_string, "w"); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:194:5: [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 buff1[24]; data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:211: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(p,str,10); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:636: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(local_copy, subject_string, length); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:997:17: [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(&result[j], "USERID=", 7); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:1011:17: [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(&result[j], "emailAddress=", 13); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:1025:17: [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(&result[j], "emailAddress=", 13); data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils_error.c:30:1: [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 * data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:970:14: [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). length = strlen(dn) + 1; data/globus-gsi-cert-utils-10.3/library/globus_gsi_cert_utils.c:979:15: [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). while(i < strlen(dn)) data/globus-gsi-cert-utils-10.3/test/globus-gsi-cert-utils-get-x509-name-test.c:42:36: [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). test_case[i].name, strlen(test_case[i].name), name); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 1917 in approximately 0.06 seconds (34036 lines/second) Physical Source Lines of Code (SLOC) = 1312 Hits@level = [0] 2 [1] 3 [2] 9 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 14 [1+] 12 [2+] 9 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 10.6707 [1+] 9.14634 [2+] 6.85976 [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.