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/sciteproj-1.17/src/expand.h Examining data/sciteproj-1.17/src/tree_manipulation.h Examining data/sciteproj-1.17/src/prefs.h Examining data/sciteproj-1.17/src/main.c Examining data/sciteproj-1.17/src/remove.h Examining data/sciteproj-1.17/src/script.c Examining data/sciteproj-1.17/src/recent_files.c Examining data/sciteproj-1.17/src/prefs.c Examining data/sciteproj-1.17/src/tree_manipulation.c Examining data/sciteproj-1.17/src/graphics.c Examining data/sciteproj-1.17/src/gui_callbacks.h Examining data/sciteproj-1.17/src/expand.c Examining data/sciteproj-1.17/src/statusbar.c Examining data/sciteproj-1.17/src/gui_callbacks.c Examining data/sciteproj-1.17/src/scite_utils.c Examining data/sciteproj-1.17/src/clicked_node.h Examining data/sciteproj-1.17/src/about.c Examining data/sciteproj-1.17/src/folder_config.c Examining data/sciteproj-1.17/src/about.h Examining data/sciteproj-1.17/src/sort.h Examining data/sciteproj-1.17/src/string_utils.h Examining data/sciteproj-1.17/src/graphics.h Examining data/sciteproj-1.17/src/file_utils.c Examining data/sciteproj-1.17/src/clipboard.h Examining data/sciteproj-1.17/src/statusbar.h Examining data/sciteproj-1.17/src/icon.h Examining data/sciteproj-1.17/src/folder_config.h Examining data/sciteproj-1.17/src/clipboard.c Examining data/sciteproj-1.17/src/properties_dialog.h Examining data/sciteproj-1.17/src/load_folder.c Examining data/sciteproj-1.17/src/sort.c Examining data/sciteproj-1.17/src/icon.c Examining data/sciteproj-1.17/src/scite_utils.h Examining data/sciteproj-1.17/src/script.h Examining data/sciteproj-1.17/src/properties_dialog.c Examining data/sciteproj-1.17/src/gui.c Examining data/sciteproj-1.17/src/load_folder.h Examining data/sciteproj-1.17/src/remove.c Examining data/sciteproj-1.17/src/menus.h Examining data/sciteproj-1.17/src/string_utils.c Examining data/sciteproj-1.17/src/menus.c Examining data/sciteproj-1.17/src/gui.h Examining data/sciteproj-1.17/src/recent_files.h Examining data/sciteproj-1.17/src/file_utils.h FINAL RESULTS: data/sciteproj-1.17/src/remove.c:252:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buffer, format, args); data/sciteproj-1.17/src/scite_utils.c:472:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(scite_arg1, opt1); data/sciteproj-1.17/src/scite_utils.c:482:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(scite_arg2, opt2); data/sciteproj-1.17/src/scite_utils.c:511:5: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(prefs.scite_path, prefs.scite_path, scite_arg1, scite_arg2, scite_arg3, scite_arg4, (char *) NULL); data/sciteproj-1.17/src/scite_utils.c:515:5: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(sSciteExecName0, sSciteExecName0, scite_arg1, scite_arg2, scite_arg3, scite_arg4, (char *) NULL); data/sciteproj-1.17/src/scite_utils.c:518:5: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(sSciteExecName1, sSciteExecName1, scite_arg1, scite_arg2, scite_arg3, scite_arg4, (char *) NULL); data/sciteproj-1.17/src/scite_utils.c:522:5: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(sSciteExecName2, sSciteExecName2, scite_arg1, scite_arg2, scite_arg3, scite_arg4, (char *) NULL); data/sciteproj-1.17/src/scite_utils.c:525:5: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(sSciteExecName3, sSciteExecName3, scite_arg1, scite_arg2, scite_arg3, scite_arg4, (char *) NULL); data/sciteproj-1.17/src/script.c:272:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, argp); data/sciteproj-1.17/src/string_utils.c:89:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(st,ap); data/sciteproj-1.17/src/main.c:171:26: [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. gchar *scite_path_env = getenv("SciTE_HOME"); data/sciteproj-1.17/src/prefs.c:257:49: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. gchar *old_configfilename = g_build_filename(g_get_home_dir(), ".sciteproj", NULL); data/sciteproj-1.17/src/scite_utils.c:724:23: [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 *displayName = getenv("DISPLAY"); data/sciteproj-1.17/src/remove.c:247: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 buffer[256]; data/sciteproj-1.17/src/scite_utils.c:315:3: [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 scite_arg1[256]; data/sciteproj-1.17/src/scite_utils.c:316:3: [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 scite_arg2[256]; data/sciteproj-1.17/src/scite_utils.c:317:3: [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 scite_arg3[256]; data/sciteproj-1.17/src/scite_utils.c:318:3: [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 scite_arg4[256]; data/sciteproj-1.17/src/scite_utils.c:387:26: [2] (misc) open: 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). if ((sResponsePipeFD = open(responsePipePath, O_RDONLY | O_NONBLOCK)) <= 0) { data/sciteproj-1.17/src/scite_utils.c:609:25: [2] (misc) open: 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). if ((sRequestPipeFD = open(requestPipePath, O_WRONLY | O_NONBLOCK)) <= 0) { data/sciteproj-1.17/src/file_utils.c:71:17: [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 len = (int)strlen(instring); data/sciteproj-1.17/src/file_utils.c:109:21: [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). for (co = 0; co < strlen(source); co++) { data/sciteproj-1.17/src/file_utils.c:154:26: [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). for (co = 0; co < (int)strlen(infile); co++) { data/sciteproj-1.17/src/file_utils.c:227:24: [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 (current_directory[strlen(current_directory) - 1] != G_DIR_SEPARATOR) { data/sciteproj-1.17/src/file_utils.c:283:22: [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 absPathLength = strlen(absPath); data/sciteproj-1.17/src/file_utils.c:315:24: [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). localBasePathLength = strlen(localBasePath); data/sciteproj-1.17/src/file_utils.c:392:20: [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). for (co = 0; co < strlen(relativePath); co++) { data/sciteproj-1.17/src/file_utils.c:432:18: [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). absPathLength = strlen(localAbsPath); data/sciteproj-1.17/src/file_utils.c:578:13: [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 len = strlen(temp); data/sciteproj-1.17/src/gui_callbacks.c:198:13: [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 len = strlen(infolder); data/sciteproj-1.17/src/gui_callbacks.c:422:41: [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 (g_ascii_strncasecmp(key, filename, strlen(key)) == 0) res = FALSE; data/sciteproj-1.17/src/load_folder.c:63:12: [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 len = strlen(full_filename); data/sciteproj-1.17/src/prefs.c:101:25: [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). for (co = 0; co < (int)strlen(in_config); co++) { data/sciteproj-1.17/src/prefs.c:360:20: [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). for (co = 0; co < strlen(teststring); co++) { data/sciteproj-1.17/src/recent_files.c:314: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). if (fileExt == NULL || (int)strlen(fileExt) <= 0) { data/sciteproj-1.17/src/scite_utils.c:169:13: [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 len=strlen(buff); data/sciteproj-1.17/src/scite_utils.c:182:33: [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). char *windowIDStr = buff + strlen(askpropertyResponse); data/sciteproj-1.17/src/scite_utils.c:437: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). int len = strlen(instring); data/sciteproj-1.17/src/scite_utils.c:474:4: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(scite_arg1, ""); data/sciteproj-1.17/src/scite_utils.c:484:4: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(scite_arg2, ""); data/sciteproj-1.17/src/scite_utils.c:486:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(scite_arg3, ""); data/sciteproj-1.17/src/scite_utils.c:487:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(scite_arg4, ""); data/sciteproj-1.17/src/scite_utils.c:531:24: [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 messageLength = strlen(message); data/sciteproj-1.17/src/scite_utils.c:676:22: [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 commandLength = strlen(command); data/sciteproj-1.17/src/script.c:101:42: [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 err = luaL_loadbuffer(lua, buffer, strlen(buffer), "script_buffer"); data/sciteproj-1.17/src/statusbar.c:81:46: [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). gchar *newstring = (gchar*)(g_malloc((int)(strlen(text) + 1))); data/sciteproj-1.17/src/statusbar.c:84:26: [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). for (co = 0; co < (int)strlen(text); co++) { data/sciteproj-1.17/src/string_utils.c:56:42: [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). gulong dstLength = (*dst == NULL) ? 0 : strlen(*dst); data/sciteproj-1.17/src/string_utils.c:57:21: [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). gulong srcLength = strlen(src); data/sciteproj-1.17/src/string_utils.c:101:10: [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 len=strlen(s); data/sciteproj-1.17/src/tree_manipulation.c:106:19: [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 (sProjectDir[strlen(sProjectDir) - 1] == G_DIR_SEPARATOR) { data/sciteproj-1.17/src/tree_manipulation.c:352:25: [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 (fileExt == NULL || strlen(fileExt) == 0) { ANALYSIS SUMMARY: Hits = 52 Lines analyzed = 8802 in approximately 0.18 seconds (48288 lines/second) Physical Source Lines of Code (SLOC) = 4426 Hits@level = [0] 27 [1] 32 [2] 7 [3] 3 [4] 10 [5] 0 Hits@level+ = [0+] 79 [1+] 52 [2+] 20 [3+] 13 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 17.8491 [1+] 11.7488 [2+] 4.51875 [3+] 2.93719 [4+] 2.25938 [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.