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/rox-2.11/ROX-Filer/src/abox.c Examining data/rox-2.11/ROX-Filer/src/abox.h Examining data/rox-2.11/ROX-Filer/src/action.c Examining data/rox-2.11/ROX-Filer/src/action.h Examining data/rox-2.11/ROX-Filer/src/appinfo.c Examining data/rox-2.11/ROX-Filer/src/appinfo.h Examining data/rox-2.11/ROX-Filer/src/appmenu.c Examining data/rox-2.11/ROX-Filer/src/appmenu.h Examining data/rox-2.11/ROX-Filer/src/bind.c Examining data/rox-2.11/ROX-Filer/src/bind.h Examining data/rox-2.11/ROX-Filer/src/bookmarks.c Examining data/rox-2.11/ROX-Filer/src/bookmarks.h Examining data/rox-2.11/ROX-Filer/src/bulk_rename.c Examining data/rox-2.11/ROX-Filer/src/bulk_rename.h Examining data/rox-2.11/ROX-Filer/src/cell_icon.c Examining data/rox-2.11/ROX-Filer/src/cell_icon.h Examining data/rox-2.11/ROX-Filer/src/choices.h Examining data/rox-2.11/ROX-Filer/src/collection.c Examining data/rox-2.11/ROX-Filer/src/collection.h Examining data/rox-2.11/ROX-Filer/src/dir.c Examining data/rox-2.11/ROX-Filer/src/dir.h Examining data/rox-2.11/ROX-Filer/src/diritem.c Examining data/rox-2.11/ROX-Filer/src/diritem.h Examining data/rox-2.11/ROX-Filer/src/display.c Examining data/rox-2.11/ROX-Filer/src/display.h Examining data/rox-2.11/ROX-Filer/src/dnd.h Examining data/rox-2.11/ROX-Filer/src/dropbox.c Examining data/rox-2.11/ROX-Filer/src/dropbox.h Examining data/rox-2.11/ROX-Filer/src/filer.c Examining data/rox-2.11/ROX-Filer/src/filer.h Examining data/rox-2.11/ROX-Filer/src/find.c Examining data/rox-2.11/ROX-Filer/src/find.h Examining data/rox-2.11/ROX-Filer/src/fscache.c Examining data/rox-2.11/ROX-Filer/src/fscache.h Examining data/rox-2.11/ROX-Filer/src/global.h Examining data/rox-2.11/ROX-Filer/src/gtksavebox.c Examining data/rox-2.11/ROX-Filer/src/gtksavebox.h Examining data/rox-2.11/ROX-Filer/src/gui_support.c Examining data/rox-2.11/ROX-Filer/src/gui_support.h Examining data/rox-2.11/ROX-Filer/src/i18n.h Examining data/rox-2.11/ROX-Filer/src/icon.c Examining data/rox-2.11/ROX-Filer/src/icon.h Examining data/rox-2.11/ROX-Filer/src/infobox.c Examining data/rox-2.11/ROX-Filer/src/infobox.h Examining data/rox-2.11/ROX-Filer/src/log.c Examining data/rox-2.11/ROX-Filer/src/log.h Examining data/rox-2.11/ROX-Filer/src/main.h Examining data/rox-2.11/ROX-Filer/src/menu.h Examining data/rox-2.11/ROX-Filer/src/minibuffer.c Examining data/rox-2.11/ROX-Filer/src/minibuffer.h Examining data/rox-2.11/ROX-Filer/src/modechange.c Examining data/rox-2.11/ROX-Filer/src/modechange.h Examining data/rox-2.11/ROX-Filer/src/mount.c Examining data/rox-2.11/ROX-Filer/src/mount.h Examining data/rox-2.11/ROX-Filer/src/my_vfs.h Examining data/rox-2.11/ROX-Filer/src/options.c Examining data/rox-2.11/ROX-Filer/src/options.h Examining data/rox-2.11/ROX-Filer/src/panel.c Examining data/rox-2.11/ROX-Filer/src/panel.h Examining data/rox-2.11/ROX-Filer/src/pinboard.c Examining data/rox-2.11/ROX-Filer/src/pinboard.h Examining data/rox-2.11/ROX-Filer/src/pixmaps.c Examining data/rox-2.11/ROX-Filer/src/pixmaps.h Examining data/rox-2.11/ROX-Filer/src/remote.c Examining data/rox-2.11/ROX-Filer/src/remote.h Examining data/rox-2.11/ROX-Filer/src/run.c Examining data/rox-2.11/ROX-Filer/src/run.h Examining data/rox-2.11/ROX-Filer/src/sc.c Examining data/rox-2.11/ROX-Filer/src/sc.h Examining data/rox-2.11/ROX-Filer/src/support.c Examining data/rox-2.11/ROX-Filer/src/support.h Examining data/rox-2.11/ROX-Filer/src/tasklist.c Examining data/rox-2.11/ROX-Filer/src/tasklist.h Examining data/rox-2.11/ROX-Filer/src/toolbar.h Examining data/rox-2.11/ROX-Filer/src/type.c Examining data/rox-2.11/ROX-Filer/src/type.h Examining data/rox-2.11/ROX-Filer/src/usericons.c Examining data/rox-2.11/ROX-Filer/src/usericons.h Examining data/rox-2.11/ROX-Filer/src/view_collection.c Examining data/rox-2.11/ROX-Filer/src/view_collection.h Examining data/rox-2.11/ROX-Filer/src/view_details.c Examining data/rox-2.11/ROX-Filer/src/view_details.h Examining data/rox-2.11/ROX-Filer/src/view_iface.c Examining data/rox-2.11/ROX-Filer/src/view_iface.h Examining data/rox-2.11/ROX-Filer/src/wrapped.c Examining data/rox-2.11/ROX-Filer/src/wrapped.h Examining data/rox-2.11/ROX-Filer/src/xdgmime.c Examining data/rox-2.11/ROX-Filer/src/xdgmime.h Examining data/rox-2.11/ROX-Filer/src/xdgmimealias.c Examining data/rox-2.11/ROX-Filer/src/xdgmimealias.h Examining data/rox-2.11/ROX-Filer/src/xdgmimecache.c Examining data/rox-2.11/ROX-Filer/src/xdgmimecache.h Examining data/rox-2.11/ROX-Filer/src/xdgmimeglob.c Examining data/rox-2.11/ROX-Filer/src/xdgmimeglob.h Examining data/rox-2.11/ROX-Filer/src/xdgmimeint.c Examining data/rox-2.11/ROX-Filer/src/xdgmimeint.h Examining data/rox-2.11/ROX-Filer/src/xdgmimemagic.c Examining data/rox-2.11/ROX-Filer/src/xdgmimemagic.h Examining data/rox-2.11/ROX-Filer/src/xdgmimeparent.c Examining data/rox-2.11/ROX-Filer/src/xdgmimeparent.h Examining data/rox-2.11/ROX-Filer/src/xml.c Examining data/rox-2.11/ROX-Filer/src/xml.h Examining data/rox-2.11/ROX-Filer/src/xtypes.c Examining data/rox-2.11/ROX-Filer/src/xtypes.h Examining data/rox-2.11/ROX-Filer/src/choices.c Examining data/rox-2.11/ROX-Filer/src/i18n.c Examining data/rox-2.11/ROX-Filer/src/main.c Examining data/rox-2.11/ROX-Filer/src/menu.c Examining data/rox-2.11/ROX-Filer/src/session.c Examining data/rox-2.11/ROX-Filer/src/toolbar.c Examining data/rox-2.11/ROX-Filer/src/dnd.c Examining data/rox-2.11/ROX-Filer/src/session.h FINAL RESULTS: data/rox-2.11/ROX-Filer/src/action.c:1168:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path, new_mode)) data/rox-2.11/ROX-Filer/src/action.c:1411:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(safe_dest, mode)) data/rox-2.11/ROX-Filer/src/infobox.c:937:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(perm->path, nmode)) data/rox-2.11/ROX-Filer/src/main.c:965:8: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(path, 0755); data/rox-2.11/ROX-Filer/src/run.c:505:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. got = readlink(full_path, path, MAXPATHLEN); data/rox-2.11/ROX-Filer/src/support.c:838:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. got = readlink(source, path, MAXPATHLEN); data/rox-2.11/ROX-Filer/src/action.c:923:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. : access(src_path, W_OK) != 0; data/rox-2.11/ROX-Filer/src/action.c:1485:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dest_path, F_OK) == 0) data/rox-2.11/ROX-Filer/src/bulk_rename.c:375:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(after, F_OK) == 0) data/rox-2.11/ROX-Filer/src/bulk_rename.c:442:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dest, F_OK) == 0) data/rox-2.11/ROX-Filer/src/find.c:289:12: [4] (shell) system: 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. retcode = system(to_sys->str); data/rox-2.11/ROX-Filer/src/find.c:352:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(info->fullpath, R_OK) == 0; data/rox-2.11/ROX-Filer/src/find.c:354:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(info->fullpath, W_OK) == 0; data/rox-2.11/ROX-Filer/src/find.c:356:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(info->fullpath, X_OK) == 0; data/rox-2.11/ROX-Filer/src/gui_support.c:1562:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(uri_0launch, X_OK) == 0) data/rox-2.11/ROX-Filer/src/infobox.c:264:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(help_dir, F_OK) == 0) data/rox-2.11/ROX-Filer/src/infobox.c:843:8: [4] (shell) execvp: 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. if (execvp(argv[0], argv)) data/rox-2.11/ROX-Filer/src/main.c:512:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(_(USAGE)); data/rox-2.11/ROX-Filer/src/panel.c:364:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (load_path && access(load_path, F_OK) == 0) data/rox-2.11/ROX-Filer/src/panel.c:1436:4: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(icon->path, W_OK) != 0) data/rox-2.11/ROX-Filer/src/panel.c:1986:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(argv[0], X_OK) != 0) data/rox-2.11/ROX-Filer/src/pinboard.c:311:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(name, F_OK)) data/rox-2.11/ROX-Filer/src/pinboard.c:1789:4: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(icon->path, W_OK) != 0) data/rox-2.11/ROX-Filer/src/pixmaps.c:342:4: [4] (shell) execl: 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. execl(thumb_prog, thumb_prog, path, data/rox-2.11/ROX-Filer/src/run.c:184:9: [4] (shell) execv: 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. if (execv(argv[0], (char **) argv)) data/rox-2.11/ROX-Filer/src/support.c:1499:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(startp, X_OK) == 0) data/rox-2.11/ROX-Filer/src/support.c:1719:3: [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(result, path); data/rox-2.11/ROX-Filer/src/support.c:1720:3: [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(result, subs+2); data/rox-2.11/ROX-Filer/src/support.c:1756:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if(access(app, X_OK)==0) data/rox-2.11/ROX-Filer/src/type.c:823:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(handler, X_OK) != 0) data/rox-2.11/ROX-Filer/src/type.c:1368:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dir, F_OK) != 0) data/rox-2.11/ROX-Filer/src/type.c:1381:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(index_path, F_OK) == 0) data/rox-2.11/ROX-Filer/src/usericons.c:314:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(path, W_OK) == 0) data/rox-2.11/ROX-Filer/src/xdgmime.c:137:3: [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 (file_name, directory); strcat (file_name, "/mime/mime.cache"); data/rox-2.11/ROX-Filer/src/xdgmime.c:162:3: [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 (file_name, directory); strcat (file_name, "/mime/globs"); data/rox-2.11/ROX-Filer/src/xdgmime.c:179:3: [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 (file_name, directory); strcat (file_name, "/mime/magic"); data/rox-2.11/ROX-Filer/src/xdgmime.c:196:3: [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 (file_name, directory); strcat (file_name, "/mime/aliases"); data/rox-2.11/ROX-Filer/src/xdgmime.c:201:3: [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 (file_name, directory); strcat (file_name, "/mime/subclasses"); data/rox-2.11/ROX-Filer/src/xdgmime.c:234: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 (guessed_xdg_home, home); data/rox-2.11/ROX-Filer/src/xdgmime.c:342:3: [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 (file_name, directory); strcat (file_name, "/mime/mime.cache"); data/rox-2.11/ROX-Filer/src/xdgmime.c:360:3: [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 (file_name, directory); strcat (file_name, "/mime/globs"); data/rox-2.11/ROX-Filer/src/xdgmime.c:371:3: [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 (file_name, directory); strcat (file_name, "/mime/magic"); data/rox-2.11/ROX-Filer/src/choices.c:79:12: [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. choices = getenv("CHOICESPATH"); data/rox-2.11/ROX-Filer/src/choices.c:102:43: [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. dir_list[0] = g_strconcat(g_get_home_dir(),".choice", NULL); data/rox-2.11/ROX-Filer/src/choices.c:103:43: [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. dir_list[1] = g_strconcat(g_get_home_dir(),".rox/choices", NULL); data/rox-2.11/ROX-Filer/src/choices.c:104:43: [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. dir_list[2] = g_strconcat(g_get_home_dir(),".rox_choices", NULL); data/rox-2.11/ROX-Filer/src/choices.c:111:8: [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. env = getenv("XDG_CONFIG_DIRS"); data/rox-2.11/ROX-Filer/src/choices.c:120:8: [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. env = getenv("XDG_CONFIG_HOME"); data/rox-2.11/ROX-Filer/src/choices.c:124:30: [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. dirs[0] = g_build_filename(g_get_home_dir(), ".config", NULL); data/rox-2.11/ROX-Filer/src/i18n.c:66:9: [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. lang = getenv("LANG"); data/rox-2.11/ROX-Filer/src/main.c:282:13: [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. home_dir = g_get_home_dir(); data/rox-2.11/ROX-Filer/src/main.c:376:7: [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. c = getopt_long(argc, argv, SHORT_OPS, data/rox-2.11/ROX-Filer/src/main.c:379:7: [3] (buffer) getopt: 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. c = getopt(argc, argv, SHORT_OPS); data/rox-2.11/ROX-Filer/src/minibuffer.c:469:20: [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. new=g_strconcat(g_get_home_dir(), "/", data/rox-2.11/ROX-Filer/src/sc.c:199:5: [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. if(getenv("SESSION_MANAGER") == NULL) data/rox-2.11/ROX-Filer/src/support.c:123:6: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(path, real)) data/rox-2.11/ROX-Filer/src/support.c:1748:11: [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. g_get_home_dir()); data/rox-2.11/ROX-Filer/src/type.c:1165:8: [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. env = getenv("XDG_DATA_DIRS"); data/rox-2.11/ROX-Filer/src/type.c:1174:8: [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. env = getenv("XDG_DATA_HOME"); data/rox-2.11/ROX-Filer/src/type.c:1178:30: [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. dirs[0] = g_build_filename(g_get_home_dir(), ".local", data/rox-2.11/ROX-Filer/src/xdgmime.c:217:19: [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. xdg_data_home = getenv ("XDG_DATA_HOME"); data/rox-2.11/ROX-Filer/src/xdgmime.c:227: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. home = getenv ("HOME"); data/rox-2.11/ROX-Filer/src/xdgmime.c:244:19: [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. xdg_data_dirs = getenv ("XDG_DATA_DIRS"); data/rox-2.11/ROX-Filer/src/action.c:382:29: [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). abox_set_percentage(abox, atoi(buffer+1)); data/rox-2.11/ROX-Filer/src/action.c:393: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 buf[5]; data/rox-2.11/ROX-Filer/src/action.c:540: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 len_buffer[5]; data/rox-2.11/ROX-Filer/src/action.c:545:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(len_buffer, "%04" G_GSIZE_MODIFIER "x", message->len); data/rox-2.11/ROX-Filer/src/dir.c:206:8: [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). fd = open(dir->pathname, O_RDONLY); data/rox-2.11/ROX-Filer/src/dir.c:1151: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 buf[sizeof(struct inotify_event)+1024]; data/rox-2.11/ROX-Filer/src/dnd.c:861:7: [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). fd = open(make_path(dest_path, leafname), data/rox-2.11/ROX-Filer/src/filer.c:1188: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 group[2] = "1"; data/rox-2.11/ROX-Filer/src/filer.c:2986:11: [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). hidden=atoi(val) || (strcmp(val, "true")==0); data/rox-2.11/ROX-Filer/src/filer.c:3129:10: [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). set->x=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3132:10: [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). set->y=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3135:14: [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). set->width=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3138:15: [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). set->height=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3141:20: [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). set->show_hidden=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3144:18: [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). set->view_type=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3147:21: [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). set->details_type=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3150:18: [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). set->sort_type=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3153:19: [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). set->sort_order=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3156:22: [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). set->display_style=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3159:20: [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). set->show_thumbs=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3162:20: [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). set->filter_type=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3168:27: [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). set->filter_directories=atoi(str); data/rox-2.11/ROX-Filer/src/filer.c:3216:21: [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). GINT_TO_POINTER(atoi(p+1))); data/rox-2.11/ROX-Filer/src/filer.c:3233:10: [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). *pfp = fopen(spath, "w"); data/rox-2.11/ROX-Filer/src/gui_support.c:1464:6: [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). f = fopen (filename, "rb"); data/rox-2.11/ROX-Filer/src/infobox.c:869: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[20]; data/rox-2.11/ROX-Filer/src/log.c:78: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 timestamp[32]; data/rox-2.11/ROX-Filer/src/log.c:93:3: [2] (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 string. strcpy(timestamp, "ERROR"); data/rox-2.11/ROX-Filer/src/main.c:273:7: [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). fd = open("/dev/null", O_RDONLY); data/rox-2.11/ROX-Filer/src/main.c:488:10: [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). fd = open("/dev/null", O_RDONLY); data/rox-2.11/ROX-Filer/src/main.c:812: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 buf[BUFLEN]; data/rox-2.11/ROX-Filer/src/main.c:952:13: [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). fp = fopen(path, "w"); data/rox-2.11/ROX-Filer/src/menu.c:1376:7: [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). fd = open(path, O_CREAT | O_EXCL, 0666); data/rox-2.11/ROX-Filer/src/menu.c:1818:5: [2] (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 string. strcpy(strrchr(manual, '_'), ".html"); data/rox-2.11/ROX-Filer/src/mount.c:295:8: [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). tab = fopen(THE_FSTAB, "r"); data/rox-2.11/ROX-Filer/src/my_vfs.h:52:19: [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). # define mc_open open data/rox-2.11/ROX-Filer/src/options.c:251:22: [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). option->int_value = atoi(new); data/rox-2.11/ROX-Filer/src/options.c:337:22: [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). option->int_value = atoi(value); data/rox-2.11/ROX-Filer/src/options.c:443:23: [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). option->int_value = atoi(value); data/rox-2.11/ROX-Filer/src/options.c:594:11: [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). retval = atoi(txt); data/rox-2.11/ROX-Filer/src/options.c:1099:22: [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). option->int_value = atoi(option->value); data/rox-2.11/ROX-Filer/src/panel.c:276:13: [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). *target = atoi(prop); data/rox-2.11/ROX-Filer/src/panel.c:285: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 prop[16]; data/rox-2.11/ROX-Filer/src/panel.c:287:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(prop, "%d", value); data/rox-2.11/ROX-Filer/src/panel.c:312:13: [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). FILE *fp = fopen(tmp, "w"); data/rox-2.11/ROX-Filer/src/panel.c:1980: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 *argv[3]; data/rox-2.11/ROX-Filer/src/pinboard.c:1552:7: [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). x = atoi(tmp); data/rox-2.11/ROX-Filer/src/pinboard.c:1558:7: [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). y = atoi(tmp); data/rox-2.11/ROX-Filer/src/pinboard.c:2516: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 buf[256]; data/rox-2.11/ROX-Filer/src/pixmaps.c:656:17: [2] (integer) atol: 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). ttime=(time_t) atol(smtime); data/rox-2.11/ROX-Filer/src/pixmaps.c:661:30: [2] (integer) atol: 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). if (ssize && info.st_size < atol(ssize)) data/rox-2.11/ROX-Filer/src/pixmaps.c:1100:14: [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 header[256]; data/rox-2.11/ROX-Filer/src/pixmaps.c:1109:8: [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). in=fopen(path, "rb"); data/rox-2.11/ROX-Filer/src/run.c:194:4: [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(pd->data, data, length); data/rox-2.11/ROX-Filer/src/run.c:502: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 path[MAXPATHLEN + 1]; data/rox-2.11/ROX-Filer/src/run.c:732:9: [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). char *open; data/rox-2.11/ROX-Filer/src/run.c:738:7: [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 (!open) data/rox-2.11/ROX-Filer/src/run.c:741:11: [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 (stat(open, &info)) data/rox-2.11/ROX-Filer/src/run.c:743:32: [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). report_error("stat(%s): %s", open, g_strerror(errno)); data/rox-2.11/ROX-Filer/src/run.c:744:10: [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). g_free(open); data/rox-2.11/ROX-Filer/src/run.c:763:4: [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). open); data/rox-2.11/ROX-Filer/src/run.c:764:36: [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). choices_dir = g_path_get_dirname(open); data/rox-2.11/ROX-Filer/src/run.c:769:10: [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). g_free(open); data/rox-2.11/ROX-Filer/src/run.c:775: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). argv[0] = g_strconcat(open, "/AppRun", NULL); data/rox-2.11/ROX-Filer/src/run.c:778: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). else if (type_get_type(open) == application_x_desktop) data/rox-2.11/ROX-Filer/src/run.c:780:13: [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). argv[0] = open; data/rox-2.11/ROX-Filer/src/run.c:781:15: [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). run_desktop(open, (const char **) (argv + 1), home_dir); data/rox-2.11/ROX-Filer/src/run.c:785:13: [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). argv[0] = open; data/rox-2.11/ROX-Filer/src/run.c:789:17: [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 (argv[0] != open) data/rox-2.11/ROX-Filer/src/run.c:792:9: [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). g_free(open); data/rox-2.11/ROX-Filer/src/support.c:81:8: [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). out = fopen(filename, "w"); data/rox-2.11/ROX-Filer/src/support.c:119: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 real[MAXPATHLEN]; data/rox-2.11/ROX-Filer/src/support.c:170: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 buffer[4096]; data/rox-2.11/ROX-Filer/src/support.c:566:9: [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 time_buf[32]; data/rox-2.11/ROX-Filer/src/support.c:824:19: [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). return !!atoi(text); data/rox-2.11/ROX-Filer/src/support.c:835: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 path[MAXPATHLEN + 1]; data/rox-2.11/ROX-Filer/src/support.c:910:3: [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((md5byte *)ctx->in + 64 - t, buf, len); data/rox-2.11/ROX-Filer/src/support.c:914:2: [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((md5byte *)ctx->in + 64 - t, buf, t); data/rox-2.11/ROX-Filer/src/support.c:922:3: [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(ctx->in, buf, 64); data/rox-2.11/ROX-Filer/src/support.c:930:2: [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(ctx->in, buf, len); data/rox-2.11/ROX-Filer/src/support.c:972:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(retval + (i * 2), "%02x", bytes[i]); data/rox-2.11/ROX-Filer/src/support.c:1357: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 buf[3]; data/rox-2.11/ROX-Filer/src/support.c:1474:2: [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(name + pathlen + 1, file, len); data/rox-2.11/ROX-Filer/src/support.c:1494:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. startp = memcpy (name - (p - path), path, p - path); data/rox-2.11/ROX-Filer/src/support.c:1590:7: [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). fd = open(path, O_RDONLY); data/rox-2.11/ROX-Filer/src/support.c:1644:7: [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). fd = open(path, O_RDONLY); data/rox-2.11/ROX-Filer/src/type.c:331:8: [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). char *open; data/rox-2.11/ROX-Filer/src/type.c:338:7: [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 (!open) data/rox-2.11/ROX-Filer/src/type.c:342:7: [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 (!open) data/rox-2.11/ROX-Filer/src/type.c:348:24: [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). target = readlink_dup(open); data/rox-2.11/ROX-Filer/src/type.c:351:10: [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). return open; data/rox-2.11/ROX-Filer/src/type.c:357:10: [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). g_free(open); data/rox-2.11/ROX-Filer/src/type.c:366:28: [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). dir = g_path_get_dirname(open); data/rox-2.11/ROX-Filer/src/type.c:367:10: [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). g_free(open); data/rox-2.11/ROX-Filer/src/type.c:589:7: [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). fd = open(path, O_CREAT | O_WRONLY, 0755); data/rox-2.11/ROX-Filer/src/xdgmime.c:137:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/mime.cache"); data/rox-2.11/ROX-Filer/src/xdgmime.c:162:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/globs"); data/rox-2.11/ROX-Filer/src/xdgmime.c:179:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/magic"); data/rox-2.11/ROX-Filer/src/xdgmime.c:196:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/aliases"); data/rox-2.11/ROX-Filer/src/xdgmime.c:201:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/subclasses"); data/rox-2.11/ROX-Filer/src/xdgmime.c:235:4: [2] (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 string. strcat (guessed_xdg_home, "/.local/share/"); data/rox-2.11/ROX-Filer/src/xdgmime.c:342:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/mime.cache"); data/rox-2.11/ROX-Filer/src/xdgmime.c:360:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/globs"); data/rox-2.11/ROX-Filer/src/xdgmime.c:371:34: [2] (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 string. strcpy (file_name, directory); strcat (file_name, "/mime/magic"); data/rox-2.11/ROX-Filer/src/xdgmime.c:491:9: [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. const char *mime_types[2]; data/rox-2.11/ROX-Filer/src/xdgmime.c:535:10: [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). file = fopen (file_name, "r"); data/rox-2.11/ROX-Filer/src/xdgmime.c:565:9: [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. const char *mime_types[2]; data/rox-2.11/ROX-Filer/src/xdgmime.c:805:3: [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, parents, n); data/rox-2.11/ROX-Filer/src/xdgmimealias.c:124: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 line[255]; data/rox-2.11/ROX-Filer/src/xdgmimealias.c:127:10: [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). file = fopen (file_name, "r"); data/rox-2.11/ROX-Filer/src/xdgmimecache.c:120:8: [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). fd = open (file_name, O_RDONLY|_O_BINARY, 0); data/rox-2.11/ROX-Filer/src/xdgmimecache.c:182:18: [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 *) data)[j + i]) & ((unsigned char *)cache->buffer)[mask_offset + j])) data/rox-2.11/ROX-Filer/src/xdgmimecache.c:193:76: [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. if (((unsigned char *)cache->buffer)[data_offset + j] != ((unsigned char *) data)[j + i]) data/rox-2.11/ROX-Filer/src/xdgmimecache.c:575: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 stopchars[128]; data/rox-2.11/ROX-Filer/src/xdgmimecache.c:676:9: [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. const char *mime_types[2]; data/rox-2.11/ROX-Filer/src/xdgmimecache.c:716:10: [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). file = fopen (file_name, "r"); data/rox-2.11/ROX-Filer/src/xdgmimecache.c:743:9: [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. const char *mime_types[2]; data/rox-2.11/ROX-Filer/src/xdgmimecache.c:857: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 *all_parents[128]; /* we'll stop at 128 */ data/rox-2.11/ROX-Filer/src/xdgmimecache.c:894:3: [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, all_parents, p * sizeof (char *)); data/rox-2.11/ROX-Filer/src/xdgmimeglob.c:347: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 stopchars[128]; data/rox-2.11/ROX-Filer/src/xdgmimeglob.c:526: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 line[255]; data/rox-2.11/ROX-Filer/src/xdgmimeglob.c:528:15: [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). glob_file = fopen (file_name, "r"); data/rox-2.11/ROX-Filer/src/xdgmimeint.c:44:14: [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. static const char _xdg_utf8_skip_data[256] = { data/rox-2.11/ROX-Filer/src/xdgmimemagic.c:207: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 number_string[MAX_NUMBER_SIZE + 1]; data/rox-2.11/ROX-Filer/src/xdgmimemagic.c:542:18: [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 *) data)[j + i]) & matchlet->mask[j])) data/rox-2.11/ROX-Filer/src/xdgmimemagic.c:553:45: [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. if (matchlet->value[j] != ((unsigned char *) data)[j + i]) data/rox-2.11/ROX-Filer/src/xdgmimemagic.c:898: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 header[12]; data/rox-2.11/ROX-Filer/src/xdgmimemagic.c:900:16: [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). magic_file = fopen (file_name, "r"); data/rox-2.11/ROX-Filer/src/xdgmimeparent.c:129: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 line[255]; data/rox-2.11/ROX-Filer/src/xdgmimeparent.c:133:10: [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). file = fopen (file_name, "r"); data/rox-2.11/ROX-Filer/src/xtypes.c:81: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 buf[1]; data/rox-2.11/ROX-Filer/src/xtypes.c:102: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 buf[1]; data/rox-2.11/ROX-Filer/src/action.c:493:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). got = read(source, buffer, len); data/rox-2.11/ROX-Filer/src/action.c:601:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(from_parent, &c, 1); data/rox-2.11/ROX-Filer/src/action.c:669:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). got = read(from_parent, &retval, 1); data/rox-2.11/ROX-Filer/src/action.c:703:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, &retval, 1); data/rox-2.11/ROX-Filer/src/action.c:1001:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(from_parent, &c, 1); data/rox-2.11/ROX-Filer/src/action.c:1653:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(from_parent, &c, 1); data/rox-2.11/ROX-Filer/src/dir.c:1154:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buf, sizeof(buf)); data/rox-2.11/ROX-Filer/src/dnd.c:183:4: [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). strlen(text)); data/rox-2.11/ROX-Filer/src/dnd.c:412: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). to_send_length = strlen(to_send); data/rox-2.11/ROX-Filer/src/dnd.c:418: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). to_send_length = strlen(to_send); data/rox-2.11/ROX-Filer/src/dropbox.c:163:7: [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). l = strlen(path); data/rox-2.11/ROX-Filer/src/filer.c:564:8: [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). len = strlen(mount); data/rox-2.11/ROX-Filer/src/filer.c:1311:6: [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). l = strlen(path); data/rox-2.11/ROX-Filer/src/filer.c:1952:8: [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). len = strlen(real_path); data/rox-2.11/ROX-Filer/src/filer.c:1988:8: [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). len = strlen(real); data/rox-2.11/ROX-Filer/src/filer.c:2110: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). flags[strlen(flags) - 2] = ')'; data/rox-2.11/ROX-Filer/src/find.c:995:8: [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). len = strlen(word); data/rox-2.11/ROX-Filer/src/gtksavebox.c:516: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). value, strlen (value)); data/rox-2.11/ROX-Filer/src/icon.c:646: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). gtk_selection_data_set_text(selection_data, text, strlen(text)); data/rox-2.11/ROX-Filer/src/infobox.c:873:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). got = read(source, buffer, sizeof(buffer) - 1); data/rox-2.11/ROX-Filer/src/main.c:283: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). home_dir_len = strlen(home_dir); data/rox-2.11/ROX-Filer/src/main.c:814:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(source, buf, BUFLEN); data/rox-2.11/ROX-Filer/src/menu.c:1175: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). if (new[strlen(new) - 1] == '/') data/rox-2.11/ROX-Filer/src/minibuffer.c:248:38: [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). gtk_editable_insert_text(edit, esc, strlen(esc), &pos); data/rox-2.11/ROX-Filer/src/minibuffer.c:365: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). current_stem = strlen(leaf); data/rox-2.11/ROX-Filer/src/minibuffer.c:616: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). return strncasecmp(item->leafname, pattern, strlen(pattern)) == 0; data/rox-2.11/ROX-Filer/src/minibuffer.c:666: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). longest = strlen(first); data/rox-2.11/ROX-Filer/src/minibuffer.c:678: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). path_len = strlen(filer_window->sym_path); data/rox-2.11/ROX-Filer/src/minibuffer.c:690: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). if (matches->gl_pathc == 1 && tmp[strlen(tmp) - 1] != '/') data/rox-2.11/ROX-Filer/src/minibuffer.c:771: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). gtk_editable_insert_text(edit, best, strlen(best), data/rox-2.11/ROX-Filer/src/modechange.c:56: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). if (*s == 0 || strlen (s) > 4) data/rox-2.11/ROX-Filer/src/modechange.c:102:17: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_value = umask (0); data/rox-2.11/ROX-Filer/src/modechange.c:103:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask (umask_value); /* Restore the old value. */ data/rox-2.11/ROX-Filer/src/my_vfs.h:54:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define mc_read read data/rox-2.11/ROX-Filer/src/panel.c:2015: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). pos, strlen(pos)); data/rox-2.11/ROX-Filer/src/pinboard.c:2502:47: [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). sent = write(pinboard->to_backdrop_app, ok, strlen(ok)); data/rox-2.11/ROX-Filer/src/pinboard.c:2519:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). got = read(src, buf, sizeof(buf)); data/rox-2.11/ROX-Filer/src/pixmaps.c:486:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). old_mask = umask(0077); data/rox-2.11/ROX-Filer/src/pixmaps.c:495:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(old_mask); data/rox-2.11/ROX-Filer/src/sc.c:40: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). values[i].length = strlen(vals[i]); data/rox-2.11/ROX-Filer/src/sc.c:50: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). value->length = strlen(val); data/rox-2.11/ROX-Filer/src/support.c:691:8: [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). len = strlen(item); data/rox-2.11/ROX-Filer/src/support.c:1087:27: [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). MD5Update(&ctx, message, strlen(message)); data/rox-2.11/ROX-Filer/src/support.c:1131: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). path_len = strlen(path); data/rox-2.11/ROX-Filer/src/support.c:1315:27: [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). str = g_string_sized_new(strlen(path)); data/rox-2.11/ROX-Filer/src/support.c:1349: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). tmp = g_malloc(strlen(uri_string) + 1); data/rox-2.11/ROX-Filer/src/support.c:1469:8: [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). len = strlen(file) + 1; data/rox-2.11/ROX-Filer/src/support.c:1470: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). pathlen = strlen(path); data/rox-2.11/ROX-Filer/src/support.c:1517: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). section_length = strlen(section); data/rox-2.11/ROX-Filer/src/support.c:1536: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). key_length = strlen(key); data/rox-2.11/ROX-Filer/src/support.c:1715: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 size=strlen(cmd)+strlen(path)+1; data/rox-2.11/ROX-Filer/src/support.c:1715: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 size=strlen(cmd)+strlen(path)+1; data/rox-2.11/ROX-Filer/src/support.c:1717:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(result, cmd, subs-cmd); data/rox-2.11/ROX-Filer/src/type.c:587:8: [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). len = strlen(tmp); data/rox-2.11/ROX-Filer/src/xdgmime.c:136:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:136:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:161:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/globs") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:161:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/globs") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:178:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/magic") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:178:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/magic") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:195:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/aliases") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:195:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/aliases") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:200:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/subclasses") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:200:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/subclasses") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:233:31: [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). guessed_xdg_home = malloc (strlen (home) + strlen ("/.local/share/") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:233:47: [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). guessed_xdg_home = malloc (strlen (home) + strlen ("/.local/share/") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:272:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dir, ptr, len); data/rox-2.11/ROX-Filer/src/xdgmime.c:341:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:341:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:359:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/globs") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:359:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/globs") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:370:23: [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). file_name = malloc (strlen (directory) + strlen ("/mime/magic") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:370:44: [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). file_name = malloc (strlen (directory) + strlen ("/mime/magic") + 1); data/rox-2.11/ROX-Filer/src/xdgmime.c:726: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). length = strlen (mime); data/rox-2.11/ROX-Filer/src/xdgmimealias.c:146: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). sep[strlen (sep) -1] = '\000'; data/rox-2.11/ROX-Filer/src/xdgmimecache.c:758: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). length = strlen (mime); data/rox-2.11/ROX-Filer/src/xdgmimeglob.c:545: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). colon[strlen (colon) -1] = '\000'; data/rox-2.11/ROX-Filer/src/xdgmimemagic.c:54:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define getc_unlocked(fp) getc (fp) data/rox-2.11/ROX-Filer/src/xdgmimeparent.c:152: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). sep[strlen (sep) -1] = '\000'; data/rox-2.11/ROX-Filer/src/xml.c:150: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). if (territory && strlen(lang) == (territory - target_lang) && data/rox-2.11/ROX-Filer/src/xtypes.c:171: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). value_len = strlen(value); data/rox-2.11/ROX-Filer/src/xtypes.c:227:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nb=read(fd, buf, MAX_ATTR_SIZE); data/rox-2.11/ROX-Filer/src/xtypes.c:253: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). value_len = strlen(value); ANALYSIS SUMMARY: Hits = 278 Lines analyzed = 56433 in approximately 1.16 seconds (48562 lines/second) Physical Source Lines of Code (SLOC) = 41146 Hits@level = [0] 34 [1] 83 [2] 132 [3] 21 [4] 36 [5] 6 Hits@level+ = [0+] 312 [1+] 278 [2+] 195 [3+] 63 [4+] 42 [5+] 6 Hits/KSLOC@level+ = [0+] 7.58275 [1+] 6.75643 [2+] 4.73922 [3+] 1.53113 [4+] 1.02076 [5+] 0.145822 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.