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/input-pad-1.0.3/input-pad/button-gtk.h Examining data/input-pad-1.0.3/input-pad/input-pad-marshal.h Examining data/input-pad-1.0.3/input-pad/combobox-gtk.c Examining data/input-pad-1.0.3/input-pad/input-pad-main.c Examining data/input-pad-1.0.3/input-pad/window-gtk.c Examining data/input-pad-1.0.3/input-pad/eek-gtk.c Examining data/input-pad-1.0.3/input-pad/input-pad.h Examining data/input-pad-1.0.3/input-pad/geometry-gdk.c Examining data/input-pad-1.0.3/input-pad/input-pad-marshal.c Examining data/input-pad-1.0.3/input-pad/i18n.h Examining data/input-pad-1.0.3/input-pad/parse-pad.c Examining data/input-pad-1.0.3/input-pad/geometry-gdk.h Examining data/input-pad-1.0.3/input-pad/combobox-gtk.h Examining data/input-pad-1.0.3/input-pad/xtest-gdk.c Examining data/input-pad-1.0.3/input-pad/input-pad-private.h Examining data/input-pad-1.0.3/input-pad/eek-gtk.h Examining data/input-pad-1.0.3/input-pad/geometry-xkb.h Examining data/input-pad-1.0.3/input-pad/input-pad-group.h Examining data/input-pad-1.0.3/input-pad/unicode_block.h Examining data/input-pad-1.0.3/input-pad/kbdui-gtk.c Examining data/input-pad-1.0.3/input-pad/button-gtk.c Examining data/input-pad-1.0.3/input-pad/input-pad-window-gtk.h Examining data/input-pad-1.0.3/input-pad/input-pad-kbdui-gtk.h FINAL RESULTS: data/input-pad-1.0.3/input-pad/geometry-gdk.c:997:9: [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(next, rules_file); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1002:9: [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(next, model); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1007:9: [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(next, all_layouts); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1012:9: [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(next, all_variants); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1017:9: [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(next, all_options); data/input-pad-1.0.3/input-pad/input-pad-group.h:74:33: [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. char *execl; data/input-pad-1.0.3/input-pad/parse-pad.c:221:59: [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. get_content (current->children, &cmd->execl, FALSE); data/input-pad-1.0.3/input-pad/parse-pad.c:254:40: [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. GET_TABLE_SUB_ARRAY_LEN (command, Cmd, execl) data/input-pad-1.0.3/input-pad/parse-pad.c:282:25: [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. for (i = 0; cmds[i].execl; i++) { data/input-pad-1.0.3/input-pad/parse-pad.c:283:25: [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. g_free (cmds[i].execl); data/input-pad-1.0.3/input-pad/window-gtk.c:2124:20: [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. while (cmds[i].execl) { data/input-pad-1.0.3/input-pad/window-gtk.c:2129:25: [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. for (i = 0; cmds[i].execl; i++) { data/input-pad-1.0.3/input-pad/window-gtk.c:2133:43: [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. retval[i] = g_strdup (cmds[i].execl); data/input-pad-1.0.3/input-pad/window-gtk.c:2370:71: [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. table_data->data.cmds[i].execl); data/input-pad-1.0.3/input-pad/window-gtk.c:2372:76: [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. table_data->data.cmds[i].execl); data/input-pad-1.0.3/input-pad/button-gtk.c:239: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 (buff2, "0x%02X ", (unsigned char) code); data/input-pad-1.0.3/input-pad/button-gtk.c:243:13: [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 (buff2 + i * 5, "0x%02X ", (unsigned char) buff[i]); data/input-pad-1.0.3/input-pad/window-gtk.c:2459:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[7]; data/input-pad-1.0.3/input-pad/window-gtk.c:3410:13: [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 (buff2 + j * 5, "0x%02X ", (unsigned char) buff[j]); data/input-pad-1.0.3/input-pad/window-gtk.c:3419:13: [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 (buff3 + j * 5, "0x%02X ", (unsigned char) buff[j]); data/input-pad-1.0.3/input-pad/geometry-gdk.c:148: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). if (strlen (formatted) > 2) { data/input-pad-1.0.3/input-pad/geometry-gdk.c:150: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). strlen (formatted) - 2); data/input-pad-1.0.3/input-pad/geometry-gdk.c:323:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (key_buff.name.name, new_key_name, XkbKeyNameLength); data/input-pad-1.0.3/input-pad/geometry-gdk.c:978:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (rules_file ? strlen (rules_file) : 0); data/input-pad-1.0.3/input-pad/geometry-gdk.c:979: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). len += (model ? strlen (model) : 0); data/input-pad-1.0.3/input-pad/geometry-gdk.c:980: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). len += (all_layouts ? strlen (all_layouts) : 0); data/input-pad-1.0.3/input-pad/geometry-gdk.c:981:28: [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 += (all_variants ? strlen (all_variants) : 0); data/input-pad-1.0.3/input-pad/geometry-gdk.c:982: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). len += (all_options ? strlen (all_options) : 0); data/input-pad-1.0.3/input-pad/geometry-gdk.c:998: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). next += strlen(rules_file); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1003: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). next += strlen(model); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1008: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). next += strlen(all_layouts); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1013: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). next += strlen(all_variants); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1018: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). next += strlen(all_options); data/input-pad-1.0.3/input-pad/geometry-gdk.c:1066: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). prop += strlen ((const char *) prop) + 1; data/input-pad-1.0.3/input-pad/geometry-gdk.c:1078: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). prop += strlen ((const char *) prop) + 1; data/input-pad-1.0.3/input-pad/geometry-gdk.c:1089: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). prop += strlen ((const char *) prop) + 1; data/input-pad-1.0.3/input-pad/window-gtk.c:576: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). base = (int) g_ascii_strtoll (name + strlen ("Base"), NULL, 10); data/input-pad-1.0.3/input-pad/window-gtk.c:1899: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). n_digit = strlen (formatted); data/input-pad-1.0.3/input-pad/window-gtk.c:1903: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). n_digit = strlen (formatted); data/input-pad-1.0.3/input-pad/window-gtk.c:1907: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). n_digit = strlen (formatted); data/input-pad-1.0.3/input-pad/window-gtk.c:1911: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). n_digit = strlen (formatted) * 4; data/input-pad-1.0.3/input-pad/window-gtk.c:2224: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). if (std_output && strlen (std_output) > 2) { data/input-pad-1.0.3/input-pad/window-gtk.c:2294: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). len = strlen (str); data/input-pad-1.0.3/input-pad/window-gtk.c:2320: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). len = strlen (str); data/input-pad-1.0.3/input-pad/window-gtk.c:2477:55: [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). keysym_name + strlen ("XF86_Switch_VT_")); data/input-pad-1.0.3/input-pad/window-gtk.c:2478:57: [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). } else if (!g_strncasecmp (keysym_name, "Control_", strlen ("Control_"))) { data/input-pad-1.0.3/input-pad/window-gtk.c:2502:16: [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). } else if (strlen (keysym_name) > 3) { data/input-pad-1.0.3/input-pad/window-gtk.c:5093:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). subname = filename + 3 + strlen (MODULE_NAME_PREFIX); data/input-pad-1.0.3/input-pad/window-gtk.c:5099: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). name = g_strndup (subname, strlen (subname) - strlen (G_MODULE_SUFFIX) - 1); data/input-pad-1.0.3/input-pad/window-gtk.c:5099:55: [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). name = g_strndup (subname, strlen (subname) - strlen (G_MODULE_SUFFIX) - 1); ANALYSIS SUMMARY: Hits = 50 Lines analyzed = 10097 in approximately 0.26 seconds (39528 lines/second) Physical Source Lines of Code (SLOC) = 8465 Hits@level = [0] 0 [1] 30 [2] 5 [3] 0 [4] 15 [5] 0 Hits@level+ = [0+] 50 [1+] 50 [2+] 20 [3+] 15 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 5.90667 [1+] 5.90667 [2+] 2.36267 [3+] 1.772 [4+] 1.772 [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.