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/gtkperf-0.40+ds/acconfig.h Examining data/gtkperf-0.40+ds/src/appdata.h Examining data/gtkperf-0.40+ds/src/callbacks.h Examining data/gtkperf-0.40+ds/src/interface.h Examining data/gtkperf-0.40+ds/src/tests.h Examining data/gtkperf-0.40+ds/src/callbacks.c Examining data/gtkperf-0.40+ds/src/interface.c Examining data/gtkperf-0.40+ds/src/timing.h Examining data/gtkperf-0.40+ds/src/support.c Examining data/gtkperf-0.40+ds/src/main.c Examining data/gtkperf-0.40+ds/src/tests.c Examining data/gtkperf-0.40+ds/src/timing.c Examining data/gtkperf-0.40+ds/src/support.h Examining data/gtkperf-0.40+ds/intl/dcngettext.c Examining data/gtkperf-0.40+ds/intl/dcigettext.c Examining data/gtkperf-0.40+ds/intl/libgettext.h Examining data/gtkperf-0.40+ds/intl/dgettext.c Examining data/gtkperf-0.40+ds/intl/dngettext.c Examining data/gtkperf-0.40+ds/intl/l10nflist.c Examining data/gtkperf-0.40+ds/intl/plural.c Examining data/gtkperf-0.40+ds/intl/hash-string.h Examining data/gtkperf-0.40+ds/intl/textdomain.c Examining data/gtkperf-0.40+ds/intl/intl-compat.c Examining data/gtkperf-0.40+ds/intl/ngettext.c Examining data/gtkperf-0.40+ds/intl/gettext.h Examining data/gtkperf-0.40+ds/intl/explodename.c Examining data/gtkperf-0.40+ds/intl/loadmsgcat.c Examining data/gtkperf-0.40+ds/intl/dcgettext.c Examining data/gtkperf-0.40+ds/intl/gettextP.h Examining data/gtkperf-0.40+ds/intl/localealias.c Examining data/gtkperf-0.40+ds/intl/finddomain.c Examining data/gtkperf-0.40+ds/intl/bindtextdom.c Examining data/gtkperf-0.40+ds/intl/gettext.c Examining data/gtkperf-0.40+ds/intl/loadinfo.h Examining data/gtkperf-0.40+ds/intl/localcharset.c Examining data/gtkperf-0.40+ds/intl/libgnuintl.h FINAL RESULTS: data/gtkperf-0.40+ds/intl/localcharset.c:161:8: [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 (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); data/gtkperf-0.40+ds/intl/localcharset.c:162:8: [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 (res_ptr + res_size - (l2 + 1), buf2); data/gtkperf-0.40+ds/intl/plural.c:1012:4: [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(msg, count == 0 ? ", expecting `" : " or `"); data/gtkperf-0.40+ds/intl/plural.c:1013:4: [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(msg, yytname[x]); data/gtkperf-0.40+ds/intl/dcigettext.c:134:7: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. char *getwd (); data/gtkperf-0.40+ds/intl/dcigettext.c:135:28: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. # define getcwd(buf, max) getwd (buf) data/gtkperf-0.40+ds/intl/dcigettext.c:1162: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. language = getenv ("LANGUAGE"); data/gtkperf-0.40+ds/intl/dcigettext.c:1173: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. retval = getenv ("LC_ALL"); data/gtkperf-0.40+ds/intl/dcigettext.c:1177:16: [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. retval = getenv (categoryname); data/gtkperf-0.40+ds/intl/dcigettext.c:1181:13: [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. retval = getenv ("LANG"); data/gtkperf-0.40+ds/intl/loadmsgcat.c:267:21: [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. outcharset = getenv ("OUTPUT_CHARSET"); data/gtkperf-0.40+ds/intl/localcharset.c:229:16: [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. locale = getenv ("LC_ALL"); data/gtkperf-0.40+ds/intl/localcharset.c:232:13: [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. locale = getenv ("LC_CTYPE"); data/gtkperf-0.40+ds/intl/localcharset.c:234:15: [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. locale = getenv ("LANG"); data/gtkperf-0.40+ds/src/callbacks.c:446:31: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. appdata->current_color.red = g_random_int_range (1, 65535); data/gtkperf-0.40+ds/src/callbacks.c:447:33: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. appdata->current_color.green = g_random_int_range (1, 65535); data/gtkperf-0.40+ds/src/callbacks.c:448:32: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. appdata->current_color.blue = g_random_int_range (1, 65535); data/gtkperf-0.40+ds/src/main.c:70: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, "hac:", data/gtkperf-0.40+ds/src/tests.c:393:13: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint x1 = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:396:13: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint x2 = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:399:13: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint y1 = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:402:13: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint y2 = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:444:12: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint x = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:447:12: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint y = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:450:16: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint width = g_random_int_range (0, 100); data/gtkperf-0.40+ds/src/tests.c:451:17: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint height = g_random_int_range (0, 100); data/gtkperf-0.40+ds/src/tests.c:500:12: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint x = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:503:12: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint y = g_random_int_range (0, data/gtkperf-0.40+ds/src/tests.c:543:12: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint x = g_random_int_range (-10, data/gtkperf-0.40+ds/src/tests.c:546:12: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gint y = g_random_int_range (-10, data/gtkperf-0.40+ds/intl/bindtextdom.c:159: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 (result, dirname, len); data/gtkperf-0.40+ds/intl/bindtextdom.c:197:7: [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, codeset, len); data/gtkperf-0.40+ds/intl/bindtextdom.c:233:7: [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_binding->domainname, domainname, len); data/gtkperf-0.40+ds/intl/bindtextdom.c:258: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 (result, dirname, len); data/gtkperf-0.40+ds/intl/bindtextdom.c:289:8: [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, codeset, len); data/gtkperf-0.40+ds/intl/dcigettext.c:232: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 msgid[ZERO]; data/gtkperf-0.40+ds/intl/dcigettext.c:345: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 data[ZERO]; data/gtkperf-0.40+ds/intl/dcigettext.c:448: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 (search->msgid, msgid1, msgid_len); data/gtkperf-0.40+ds/intl/dcigettext.c:639:9: [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 (newp->domainname, domainname, domainname_len + 1); data/gtkperf-0.40+ds/intl/dcigettext.c:1218:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (void *) ((char *) memcpy (dest, src, n) + n); data/gtkperf-0.40+ds/intl/finddomain.c:133:7: [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 (locale, alias_value, len); data/gtkperf-0.40+ds/intl/gettextP.h:162: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 domainname[ZERO]; data/gtkperf-0.40+ds/intl/l10nflist.c:219: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 (abs_filename, dirlist, dirlist_len); data/gtkperf-0.40+ds/intl/loadmsgcat.c:87: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). # define open __open data/gtkperf-0.40+ds/intl/loadmsgcat.c:254: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 (charset, charsetstr, len); data/gtkperf-0.40+ds/intl/loadmsgcat.c:296:6: [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, outcharset, len); data/gtkperf-0.40+ds/intl/loadmsgcat.c:297:6: [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 + len, "//TRANSLIT", 10 + 1); data/gtkperf-0.40+ds/intl/loadmsgcat.c:371: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 (domain_file->filename, O_RDONLY | O_BINARY); data/gtkperf-0.40+ds/intl/localcharset.c:103:6: [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 (file_name, dir, dir_len); data/gtkperf-0.40+ds/intl/localcharset.c:106:6: [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 (file_name + dir_len + add_slash, base, base_len + 1); data/gtkperf-0.40+ds/intl/localcharset.c:110:38: [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). if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) data/gtkperf-0.40+ds/intl/localcharset.c:117: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 buf1[50+1]; data/gtkperf-0.40+ds/intl/localcharset.c:118: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 buf2[50+1]; data/gtkperf-0.40+ds/intl/localcharset.c:247:10: [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 char buf[2 + 10 + 1]; data/gtkperf-0.40+ds/intl/localcharset.c:250: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 (buf, "CP%u", GetACP ()); data/gtkperf-0.40+ds/intl/localealias.c:206: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 (full_fname, fname, fname_len); data/gtkperf-0.40+ds/intl/localealias.c:207: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 (&full_fname[fname_len], aliasfile, sizeof aliasfile); data/gtkperf-0.40+ds/intl/localealias.c:210: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). fp = fopen (full_fname, "r"); data/gtkperf-0.40+ds/intl/localealias.c:223:7: [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[BUFSIZ]; data/gtkperf-0.40+ds/intl/localealias.c:236: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 altbuf[BUFSIZ]; data/gtkperf-0.40+ds/intl/localealias.c:316:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. map[nmap].alias = memcpy (&string_space[string_space_act], data/gtkperf-0.40+ds/intl/localealias.c:320:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. map[nmap].value = memcpy (&string_space[string_space_act], data/gtkperf-0.40+ds/intl/plural.c:1003:8: [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(msg, "parse error"); data/gtkperf-0.40+ds/intl/textdomain.c:116: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 (new_domain, domainname, len); data/gtkperf-0.40+ds/src/callbacks.c:218:33: [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). appdata->test_count_selected = atoi(optarg); data/gtkperf-0.40+ds/intl/bindtextdom.c:156: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). size_t len = strlen (dirname) + 1; data/gtkperf-0.40+ds/intl/bindtextdom.c:194: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). size_t len = strlen (codeset) + 1; data/gtkperf-0.40+ds/intl/bindtextdom.c:226: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). size_t len = strlen (domainname) + 1; data/gtkperf-0.40+ds/intl/bindtextdom.c:254: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). size_t len = strlen (dirname) + 1; data/gtkperf-0.40+ds/intl/bindtextdom.c:285: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). size_t len = strlen (codeset) + 1; data/gtkperf-0.40+ds/intl/dcigettext.c:442: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). msgid_len = strlen (msgid1) + 1; data/gtkperf-0.40+ds/intl/dcigettext.c:495: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). size_t dirname_len = strlen (binding->dirname) + 1; data/gtkperf-0.40+ds/intl/dcigettext.c:536: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). domainname_len = strlen (domainname); data/gtkperf-0.40+ds/intl/dcigettext.c:537: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). xdomainname = (char *) alloca (strlen (categoryname) data/gtkperf-0.40+ds/intl/dcigettext.c:546: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). single_locale = (char *) alloca (strlen (categoryvalue) + 1); data/gtkperf-0.40+ds/intl/dcigettext.c:702: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). nls_uint32 len = strlen (msgid); data/gtkperf-0.40+ds/intl/dcigettext.c:1066:13: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. case equal: data/gtkperf-0.40+ds/intl/finddomain.c:92: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). strlen (dirname) + 1, 0, locale, NULL, NULL, data/gtkperf-0.40+ds/intl/finddomain.c:128: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). size_t len = strlen (alias_value) + 1; data/gtkperf-0.40+ds/intl/finddomain.c:147: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). strlen (dirname) + 1, mask, language, territory, data/gtkperf-0.40+ds/intl/gettextP.h:97:5: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal, /* Comparision for equality. */ data/gtkperf-0.40+ds/intl/l10nflist.c:84: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). size_t part_len = strlen (argz); data/gtkperf-0.40+ds/intl/l10nflist.c:108: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). size_t part_len = strlen (argz); data/gtkperf-0.40+ds/intl/l10nflist.c:192: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). + strlen (language) data/gtkperf-0.40+ds/intl/l10nflist.c:194: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). ? strlen (territory) + 1 : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:196: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). ? strlen (codeset) + 1 : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:198: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). ? strlen (normalized_codeset) + 1 : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:201: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). ? strlen (modifier) + 1 : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:203: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). ? strlen (special) + 1 : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:207: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). ? strlen (sponsor) + 1 : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:209: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). ? strlen (revision) + 1 : 0)) : 0) data/gtkperf-0.40+ds/intl/l10nflist.c:210: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). + 1 + strlen (filename) + 1); data/gtkperf-0.40+ds/intl/l10nflist.c:333:48: [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). = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, data/gtkperf-0.40+ds/intl/loadmsgcat.c:89:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read __read data/gtkperf-0.40+ds/intl/loadmsgcat.c:247: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). charsetstr += strlen ("charset="); data/gtkperf-0.40+ds/intl/loadmsgcat.c:293: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). len = strlen (outcharset); data/gtkperf-0.40+ds/intl/loadmsgcat.c:419:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long int nb = (long int) read (fd, read_ptr, to_read); data/gtkperf-0.40+ds/intl/localcharset.c:97: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). size_t dir_len = strlen (dir); data/gtkperf-0.40+ds/intl/localcharset.c:98: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). size_t base_len = strlen (base); data/gtkperf-0.40+ds/intl/localcharset.c:125:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/gtkperf-0.40+ds/intl/localcharset.c:134:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/gtkperf-0.40+ds/intl/localcharset.c:141:12: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf(fp, "%50s %50s", buf1, buf2) < 2) data/gtkperf-0.40+ds/intl/localcharset.c:143: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). l1 = strlen (buf1); data/gtkperf-0.40+ds/intl/localcharset.c:144: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). l2 = strlen (buf2); data/gtkperf-0.40+ds/intl/localcharset.c:262: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). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/gtkperf-0.40+ds/intl/localcharset.c:262: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). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/gtkperf-0.40+ds/intl/localcharset.c:266: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). codeset = aliases + strlen (aliases) + 1; data/gtkperf-0.40+ds/intl/localealias.c:288: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). alias_len = strlen (alias) + 1; data/gtkperf-0.40+ds/intl/localealias.c:289: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). value_len = strlen (value) + 1; data/gtkperf-0.40+ds/intl/plural.c:999: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). size += strlen(yytname[x]) + 15, count++; data/gtkperf-0.40+ds/intl/plural.c:1014:4: [1] (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 character. strcat(msg, "'"); data/gtkperf-0.40+ds/intl/plural.c:1220:15: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. lval->op = equal; data/gtkperf-0.40+ds/intl/textdomain.c:113: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). size_t len = strlen (domainname) + 1; ANALYSIS SUMMARY: Hits = 113 Lines analyzed = 8534 in approximately 0.27 seconds (31544 lines/second) Physical Source Lines of Code (SLOC) = 5870 Hits@level = [0] 23 [1] 48 [2] 35 [3] 26 [4] 4 [5] 0 Hits@level+ = [0+] 136 [1+] 113 [2+] 65 [3+] 30 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 23.1687 [1+] 19.2504 [2+] 11.0733 [3+] 5.11073 [4+] 0.681431 [5+] 0 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.