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/lxterminal-0.3.2/src/lxterminal.c Examining data/lxterminal-0.3.2/src/unixsocket.c Examining data/lxterminal-0.3.2/src/setting.c Examining data/lxterminal-0.3.2/src/preferences.c Examining data/lxterminal-0.3.2/src/unixsocket.h Examining data/lxterminal-0.3.2/src/lxterminal.h Examining data/lxterminal-0.3.2/src/preferences.h Examining data/lxterminal-0.3.2/src/setting.h FINAL RESULTS: data/lxterminal-0.3.2/src/lxterminal.c:260:17: [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(shell, X_OK) == 0) { data/lxterminal-0.3.2/src/lxterminal.c:268:13: [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 (pw->pw_shell, X_OK) == 0) { data/lxterminal-0.3.2/src/lxterminal.c:273:9: [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 (fallback_shell, X_OK) == 0) { data/lxterminal-0.3.2/src/lxterminal.c:188:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(border, _border, sizeof(GtkBorder)); data/lxterminal-0.3.2/src/lxterminal.c:287: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 switch_tab_accel[1 + 3 + 1 + 1 + 1]; /* "<ALT>n" */ data/lxterminal-0.3.2/src/lxterminal.c:288:9: [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(switch_tab_accel, "<ALT>%d", term->index + 1); data/lxterminal-0.3.2/src/lxterminal.c:1478: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. memcpy((tmp + 3), arguments->command, cmd_len * sizeof(gchar *)); data/lxterminal-0.3.2/src/lxterminal.c:1491: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. memcpy((tmp + 1), arguments->command, cmd_len * sizeof(gchar *)); data/lxterminal-0.3.2/src/setting.c:246:18: [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). int fd = open(config_path, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR); data/lxterminal-0.3.2/src/setting.c:271:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_setting, setting, sizeof(Setting)); data/lxterminal-0.3.2/src/setting.h:140:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char * palette[16]; data/lxterminal-0.3.2/src/setting.c:253:37: [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(write(fd, file_data, strlen(file_data)) < 0) ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 3367 in approximately 0.13 seconds (25201 lines/second) Physical Source Lines of Code (SLOC) = 2521 Hits@level = [0] 34 [1] 1 [2] 8 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 46 [1+] 12 [2+] 11 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 18.2467 [1+] 4.76002 [2+] 4.36335 [3+] 1.19 [4+] 1.19 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.