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/tilda-1.5.2/src/glade-resources.h Examining data/tilda-1.5.2/src/screen-size.c Examining data/tilda-1.5.2/src/key_grabber.c Examining data/tilda-1.5.2/src/key_grabber.h Examining data/tilda-1.5.2/src/eggaccelerators.c Examining data/tilda-1.5.2/src/vte-util.h Examining data/tilda-1.5.2/src/glade-resources.c Examining data/tilda-1.5.2/src/tilda-enum-types.c Examining data/tilda-1.5.2/src/tilda-palettes.h Examining data/tilda-1.5.2/src/tilda-keybinding.h Examining data/tilda-1.5.2/src/configsys.h Examining data/tilda-1.5.2/src/tomboykeybinder.h Examining data/tilda-1.5.2/src/tilda-search-box.h Examining data/tilda-1.5.2/src/tilda-enum-types.h Examining data/tilda-1.5.2/src/screen-size.h Examining data/tilda-1.5.2/src/wizard.c Examining data/tilda-1.5.2/src/configsys.c Examining data/tilda-1.5.2/src/tilda.c Examining data/tilda-1.5.2/src/tilda-search-box.c Examining data/tilda-1.5.2/src/tomboykeybinder.c Examining data/tilda-1.5.2/src/eggaccelerators.h Examining data/tilda-1.5.2/src/tilda.h Examining data/tilda-1.5.2/src/tilda_window.c Examining data/tilda-1.5.2/src/tilda-palettes.c Examining data/tilda-1.5.2/src/tilda_terminal.c Examining data/tilda-1.5.2/src/tilda-keybinding.c Examining data/tilda-1.5.2/src/tilda-cli-options.c Examining data/tilda-1.5.2/src/xerror.h Examining data/tilda-1.5.2/src/tilda_window.h Examining data/tilda-1.5.2/src/wizard.h Examining data/tilda-1.5.2/src/tilda_terminal.h Examining data/tilda-1.5.2/src/xerror.c Examining data/tilda-1.5.2/src/debug.h Examining data/tilda-1.5.2/src/tilda-cli-options.h FINAL RESULTS: data/tilda-1.5.2/src/tilda.c:238:22: [4] (shell) popen: 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 ((ps_output = popen (ps_command, "r")) == NULL) { data/tilda-1.5.2/src/tilda.c:744: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 (tw.config_file, R_OK) == -1) data/tilda-1.5.2/src/tilda.c:407:36: [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. gchar * resolved_config_file = realpath (config_file, NULL); data/tilda-1.5.2/src/tilda.c:608:40: [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. old_config_path = g_build_filename(g_get_home_dir (), ".tilda", NULL); data/tilda-1.5.2/src/tilda_terminal.c:467: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. envv[0] = getenv("PATH"); data/tilda-1.5.2/src/configsys.c:370: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). fp = fopen(temp_config_file, "w"); data/tilda-1.5.2/src/configsys.c:607:30: [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). config1_version[i] = atoi (config1_tokens[i]); data/tilda-1.5.2/src/configsys.c:608:30: [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). config2_version[i] = atoi (config2_tokens[i]); data/tilda-1.5.2/src/tilda-palettes.c:192: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 (tilda_palettes_current_palette, palette, data/tilda-1.5.2/src/tilda.c:171:17: [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). lock->pid = atoi (temp); data/tilda-1.5.2/src/tilda.c:176: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). lock->instance = atoi (temp); data/tilda-1.5.2/src/tilda.c:202:25: [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). lock->pid = atoi (pid_s); data/tilda-1.5.2/src/tilda.c:211:34: [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). lock->instance = atoi (instance_s); data/tilda-1.5.2/src/tilda.c:245:55: [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). pids = g_slist_append (pids, GINT_TO_POINTER (atoi (buf))); data/tilda-1.5.2/src/wizard.c:1446:9: [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). i = atoi(button_index_str); data/tilda-1.5.2/src/glade-resources.c:1333:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). __pragma(section(".CRT$XCU",read)) \ data/tilda-1.5.2/src/glade-resources.c:1341:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). __pragma(section(".CRT$XCU",read)) \ data/tilda-1.5.2/src/glade-resources.c:1353:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). section(".CRT$XCU",read) data/tilda-1.5.2/src/glade-resources.c:1360:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). section(".CRT$XCU",read) data/tilda-1.5.2/src/tilda-search-box.c:163: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). pattern_length = strlen (pattern); data/tilda-1.5.2/src/tilda_terminal.c:1080:9: [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 (strlen (title) > max_length) { data/tilda-1.5.2/src/tilda_terminal.c:1086:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gchar *titleOffset = title + strlen(title) - max_length; data/tilda-1.5.2/src/wizard.c:381: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). if(title_behaviour && strlen(title) > length) { data/tilda-1.5.2/src/wizard.c:387:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gchar *titleOffset = title + strlen(title) - length; ANALYSIS SUMMARY: Hits = 24 Lines analyzed = 10737 in approximately 0.32 seconds (33419 lines/second) Physical Source Lines of Code (SLOC) = 7445 Hits@level = [0] 2 [1] 9 [2] 10 [3] 3 [4] 2 [5] 0 Hits@level+ = [0+] 26 [1+] 24 [2+] 15 [3+] 5 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 3.49228 [1+] 3.22364 [2+] 2.01478 [3+] 0.671592 [4+] 0.268637 [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.