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-callout-4.2/library/globus_callout_error.c Examining data/globus-callout-4.2/library/globus_i_callout.h Examining data/globus-callout-4.2/library/globus_callout.h Examining data/globus-callout-4.2/library/globus_callout_constants.h Examining data/globus-callout-4.2/library/globus_callout.c Examining data/globus-callout-4.2/test/libchaina_test.c Examining data/globus-callout-4.2/test/libchainb_test.c Examining data/globus-callout-4.2/test/libtest.c Examining data/globus-callout-4.2/test/callout_test.c Examining data/globus-callout-4.2/test/libchainc_test.c Examining data/globus-callout-4.2/test/callout_chain_test.c FINAL RESULTS: data/globus-callout-4.2/library/globus_callout.c:507:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(datum->file, library); data/globus-callout-4.2/library/globus_callout.c:509:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(datum->file, flavor); data/globus-callout-4.2/library/globus_callout.c:646:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(datum->file, library); data/globus-callout-4.2/library/globus_callout.c:648:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(datum->file, flavor); data/globus-callout-4.2/library/globus_callout.c:802:17: [4] (format) snprintf: 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. snprintf(library, 1024, "%s" MY_LIB_EXT, current_datum->file); data/globus-callout-4.2/library/globus_callout.c:823:25: [4] (format) snprintf: 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. snprintf(library, 1024, "%s" MY_LIB_EXT, file); data/globus-callout-4.2/library/globus_callout.c:868:40: [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. globus_libc_strdup(getenv(current_datum->env_args[i])); data/globus-callout-4.2/test/callout_test.c:45:14: [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. srcdir = getenv("srcdir"); data/globus-callout-4.2/library/globus_callout.c:87:40: [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_callout_debug_level = atoi(tmp_string); data/globus-callout-4.2/library/globus_callout.c:98:42: [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_callout_debug_fstream = fopen(tmp_string, "a"); data/globus-callout-4.2/library/globus_callout.c:295: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 buffer[GLOBUS_I_CALLOUT_LINEBUF]; data/globus-callout-4.2/library/globus_callout.c:296: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 type[128]; data/globus-callout-4.2/library/globus_callout.c:297: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 library[256]; data/globus-callout-4.2/library/globus_callout.c:298: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 symbol[128]; data/globus-callout-4.2/library/globus_callout.c:316:17: [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). conf_file = fopen(filename, "r"); data/globus-callout-4.2/library/globus_callout.c:733: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 library[1024]; data/globus-callout-4.2/library/globus_callout_error.c:28: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-callout-4.2/library/globus_callout.c:362:12: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if(sscanf(&buffer[index],"%127s%255s%127s",type,library,symbol) < 3) data/globus-callout-4.2/library/globus_callout.c:419:50: [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). if(strcspn(start, " \"=") != strlen(start)) data/globus-callout-4.2/library/globus_callout.c:500:34: [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). datum->file = malloc(strlen(library) + 2 + strlen(flavor)); data/globus-callout-4.2/library/globus_callout.c:500:56: [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). datum->file = malloc(strlen(library) + 2 + strlen(flavor)); data/globus-callout-4.2/library/globus_callout.c:508:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(datum->file, "_"); data/globus-callout-4.2/library/globus_callout.c:639:30: [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). datum->file = malloc(strlen(library) + 2 + strlen(flavor)); data/globus-callout-4.2/library/globus_callout.c:639:52: [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). datum->file = malloc(strlen(library) + 2 + strlen(flavor)); data/globus-callout-4.2/library/globus_callout.c:647:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(datum->file, "_"); ANALYSIS SUMMARY: Hits = 25 Lines analyzed = 2027 in approximately 0.09 seconds (23584 lines/second) Physical Source Lines of Code (SLOC) = 1274 Hits@level = [0] 20 [1] 8 [2] 9 [3] 2 [4] 6 [5] 0 Hits@level+ = [0+] 45 [1+] 25 [2+] 17 [3+] 8 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 35.3218 [1+] 19.6232 [2+] 13.3438 [3+] 6.27943 [4+] 4.70958 [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.