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/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.h Examining data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c Examining data/network-manager-vpnc-1.2.6/properties/nm-vpnc-helper.c Examining data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.h Examining data/network-manager-vpnc-1.2.6/properties/nm-vpnc-helper.h Examining data/network-manager-vpnc-1.2.6/properties/tests/test-import-export.c Examining data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c Examining data/network-manager-vpnc-1.2.6/auth-dialog/main.c Examining data/network-manager-vpnc-1.2.6/shared/nm-default.h Examining data/network-manager-vpnc-1.2.6/shared/nm-service-defines.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-vpn-plugin-macros.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-vpn-plugin-utils.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-shared-utils.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-macros-internal.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-shared-utils.c Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-vpn-plugin-utils.c Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/gsystem-local-alloc.h Examining data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-glib.h Examining data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c Examining data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c Examining data/network-manager-vpnc-1.2.6/src/utils.c Examining data/network-manager-vpnc-1.2.6/src/test-vpnc-output.c Examining data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.h Examining data/network-manager-vpnc-1.2.6/src/utils.h FINAL RESULTS: data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:213:4: [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 (_NM_UTILS_MACRO_FIRST (__VA_ARGS__) "\n" _NM_UTILS_MACRO_REST (__VA_ARGS__)); \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:940:2: [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. execvp (__nmtst_internal.sudo_cmd, argv); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:1311:6: [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. if (system ("/sbin/modprobe tun") == -1) data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:750:11: [3] (random) g_rand_int: 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. seed = g_rand_int (__nmtst_internal.rand); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:763:9: [3] (random) g_rand_int: 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. return g_rand_int (nmtst_get_rand ()); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:781:7: [3] (random) g_rand_int: 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. v = g_rand_int (rand); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:785:7: [3] (random) g_rand_int: 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. v = g_rand_int (rand); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:818:7: [3] (random) g_rand_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. j = g_rand_int_range (rand, 0, i); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:850:28: [3] (random) g_rand_int: 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. tmp = g_slist_nth (list, g_rand_int (rand) % l); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:192: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. tmp = getenv ("CISCO_SPLIT_INC"); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:210: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. tmp = getenv (buf); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:217: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. tmp = getenv (buf); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:232:10: [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. tmp = getenv (buf); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:294: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. tmp = getenv ("reason"); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:343:27: [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. val = addr4_to_gvariant (getenv ("VPNGATEWAY")); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:350:25: [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. val = str_to_gvariant (getenv ("TUNDEV"), FALSE); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:357:27: [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. val = addr4_to_gvariant (getenv ("INTERNAL_IP4_ADDRESS")); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:364:27: [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. val = addr4_to_gvariant (getenv ("INTERNAL_IP4_ADDRESS")); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:371: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. tmp = getenv ("INTERNAL_IP4_NETMASKLEN"); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:383: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. tmp = getenv ("INTERNAL_IP4_NETMASK"); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:400:32: [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. val = addr4_list_to_gvariant (getenv ("INTERNAL_IP4_DNS")); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:405:32: [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. val = addr4_list_to_gvariant (getenv ("INTERNAL_IP4_NBNS")); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:410:25: [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. val = str_to_gvariant (getenv ("CISCO_DEF_DOMAIN"), TRUE); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:415:36: [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. val = split_dns_list_to_gvariant (getenv ("CISCO_SPLIT_DNS")); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:428:25: [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. val = str_to_gvariant (getenv ("CISCO_BANNER"), TRUE); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:433: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. tmp = getenv ("INTERNAL_IP4_MTU"); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:945:26: [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 (_LOGD_enabled () || getenv ("NM_VPNC_DUMP_CONNECTION")) { data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:1282:6: [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 ("VPNC_DEBUG")) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:1285:47: [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. gl.log_level = _nm_utils_ascii_str_to_int64 (getenv ("NM_VPN_LOG_LEVEL"), data/network-manager-vpnc-1.2.6/src/test-vpnc-output.c:40:9: [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. num = g_random_int_range (0, MIN (olen - pos, 30));\ data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:570: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 (path, "w"); data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:674: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 str_addr[INET_ADDRSTRLEN + 1]; data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-macros-internal.h:766: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 (&_r[1], _s, _l - 3); \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:782: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 (b, &v, sizeof (guint32)); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:809: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 (dst, src, elmt_size * n_elmt); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:824: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 (bu, p_, elmt_size); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:825: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 (p_, pj, elmt_size); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:826: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 (pj, bu, elmt_size); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:994: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. static char buf[SIZE]; \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1014: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. static char u[37]; data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1025: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 __nmtst_swap_temp[sizeof(x) == sizeof(y) ? (signed) sizeof(x) : -1]; \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1026: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(__nmtst_swap_temp, &y, sizeof(x)); \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1027: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(&y, &x, sizeof(x)); \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1078: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 buf[100]; data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1096: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 buf[100]; data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:196:8: [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). num = atoi (tmp); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:204: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 buf[BUFLEN]; data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:345: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[512]; data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:485:8: [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 *hints[2] = { NULL, NULL }; data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:545: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 buf[512]; data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:633:8: [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 *args[10]; data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:1200:8: [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 *argv[3]; data/network-manager-vpnc-1.2.6/auth-dialog/main.c:262:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read (0, &c, 1); data/network-manager-vpnc-1.2.6/auth-dialog/main.c:383:32: [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). prompt = g_strdup (*iter + strlen (VPN_MSG_TAG)); data/network-manager-vpnc-1.2.6/auth-dialog/main.c:409: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). memset (p, 0, strlen (p)); data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:142: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). len = strlen (str); data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:378: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). memset (decrypted, 0, strlen (decrypted)); data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:581: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:585: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:596: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:607: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:611: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:619: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). if (value && strlen (value)) { data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:634: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:638: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). if (value && strlen (value)) { data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:647: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). if (value && strlen (value)) { data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor-plugin.c:659: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). if (value && strlen (value)) { data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:72: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). if (!str || !strlen (str) || strstr (str, " ") || strstr (str, "\t")) { data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:82: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). if (!str || !strlen (str)) { data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:259: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). taglen = strlen (tag); data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:352: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:362: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:427: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:437: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:476: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:486: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:687: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). if (value && strlen (value)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:747: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). if (password && strlen (password)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:791: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 (str && strlen (str)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:797: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 (str && strlen (str)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:803: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 (str && strlen (str)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:808: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 (str && strlen (str)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:813: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 (str && strlen (str)) data/network-manager-vpnc-1.2.6/properties/nm-vpnc-editor.c:829: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 (str && strlen (str)) data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-glib.h:439: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). bytes = g_bytes_new_take (string, strlen (string) + 1); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-macros-internal.h:760: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). _l = strlen (_s) + 3; \ data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-shared-utils.c:177: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 (str); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:344:58: [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_ascii_strncasecmp (debug, "log-level=", strlen ("log-level="))) { data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:346: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). log_level = c_log_level = g_strdup (&debug[strlen ("log-level=")]); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:355:60: [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_ascii_strncasecmp (debug, "log-domains=", strlen ("log-domains="))) { data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:357: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). log_domains = c_log_domains = g_strdup (&debug[strlen ("log-domains=")]); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:358: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_ascii_strncasecmp (debug, "sudo-cmd=", strlen ("sudo-cmd="))) { data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:360:33: [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). sudo_cmd = g_strdup (&debug[strlen ("sudo-cmd=")]); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:363:50: [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_ascii_strncasecmp (debug, "p=", strlen ("p="))) { data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:366: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). g_ptr_array_add (p_tests, g_strdup (&debug[strlen ("p=")])); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:367:50: [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_ascii_strncasecmp (debug, "s=", strlen ("s="))) { data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:370: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). g_ptr_array_add (s_tests, g_strdup (&debug[strlen ("s=")])); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h: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). g_assert (m && strlen (m) == sizeof (u) - 1); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1182: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). g_assert_cmpint (strlen (contents), ==, len); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1677:61: [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). success = g_key_file_load_from_data (keyfile, keyfile_str, strlen (keyfile_str), G_KEY_FILE_NONE, &error); data/network-manager-vpnc-1.2.6/shared/nm-utils/nm-test-utils.h:1742: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). g_assert_cmpint (_l, ==, strlen (_str)); \ data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:103: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). if (!str || strlen (str) < 1) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:124: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). if (!str || strlen (str) < 1) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:141: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). if (!str || strlen (str) < 1) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:172: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). if (!str || strlen (str) < 1) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:193: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). if (!tmp || strlen (tmp) < 1) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service-vpnc-helper.c:434: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 (tmp && strlen (tmp)) { data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:222: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 (value) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:696: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). x = write (fd, string, strlen (string)); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:714: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). x = write (fd, string, strlen (string)); data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:838: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). if (interface_name && strlen(interface_name) > 0) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:864: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 (default_username) data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:865:30: [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). && (!props_username || !strlen (props_username))) { data/network-manager-vpnc-1.2.6/src/nm-vpnc-service.c:873: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). if (!props_natt_mode || !strlen (props_natt_mode)) { data/network-manager-vpnc-1.2.6/src/test-vpnc-output.c:38: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). olen = strlen (o);\ data/network-manager-vpnc-1.2.6/src/utils.c:153: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). if (i >= strlen (VPNC_VERSION_STR) && data/network-manager-vpnc-1.2.6/src/utils.c:154: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). strncmp (output->str, VPNC_VERSION_STR, strlen (VPNC_VERSION_STR)) == 0) ANALYSIS SUMMARY: Hits = 117 Lines analyzed = 10080 in approximately 0.28 seconds (35625 lines/second) Physical Source Lines of Code (SLOC) = 7056 Hits@level = [0] 14 [1] 65 [2] 22 [3] 27 [4] 3 [5] 0 Hits@level+ = [0+] 131 [1+] 117 [2+] 52 [3+] 30 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 18.5658 [1+] 16.5816 [2+] 7.36961 [3+] 4.2517 [4+] 0.42517 [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.