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/axtls-2.1.5+ds/samples/c/axssl.c Examining data/axtls-2.1.5+ds/config/scripts/config/confdata.c Examining data/axtls-2.1.5+ds/config/scripts/config/lkc.h Examining data/axtls-2.1.5+ds/config/scripts/config/lkc_proto.h Examining data/axtls-2.1.5+ds/config/scripts/config/conf.c Examining data/axtls-2.1.5+ds/config/scripts/config/util.c Examining data/axtls-2.1.5+ds/config/scripts/config/expr.h Examining data/axtls-2.1.5+ds/config/scripts/config/symbol.c Examining data/axtls-2.1.5+ds/config/scripts/config/menu.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/msgbox.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/checklist.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/yesno.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/colors.h Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/dialog.h Examining data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c Examining data/axtls-2.1.5+ds/config/scripts/config/mconf.c Examining data/axtls-2.1.5+ds/config/scripts/config/expr.c Examining data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c Examining data/axtls-2.1.5+ds/crypto/bigint.c Examining data/axtls-2.1.5+ds/crypto/bigint.h Examining data/axtls-2.1.5+ds/crypto/aes.c Examining data/axtls-2.1.5+ds/crypto/hmac.c Examining data/axtls-2.1.5+ds/crypto/sha1.c Examining data/axtls-2.1.5+ds/crypto/rsa.c Examining data/axtls-2.1.5+ds/crypto/bigint_impl.h Examining data/axtls-2.1.5+ds/crypto/os_int.h Examining data/axtls-2.1.5+ds/crypto/crypto.h Examining data/axtls-2.1.5+ds/crypto/sha384.c Examining data/axtls-2.1.5+ds/crypto/sha512.c Examining data/axtls-2.1.5+ds/crypto/crypto_misc.c Examining data/axtls-2.1.5+ds/crypto/sha256.c Examining data/axtls-2.1.5+ds/crypto/rc4.c Examining data/axtls-2.1.5+ds/crypto/md5.c Examining data/axtls-2.1.5+ds/ssl/version.h Examining data/axtls-2.1.5+ds/ssl/p12.c Examining data/axtls-2.1.5+ds/ssl/cert.h Examining data/axtls-2.1.5+ds/ssl/openssl.c Examining data/axtls-2.1.5+ds/ssl/ssl.h Examining data/axtls-2.1.5+ds/ssl/crypto_misc.h Examining data/axtls-2.1.5+ds/ssl/tls1_clnt.c Examining data/axtls-2.1.5+ds/ssl/os_port.c Examining data/axtls-2.1.5+ds/ssl/asn1.c Examining data/axtls-2.1.5+ds/ssl/x509.c Examining data/axtls-2.1.5+ds/ssl/os_port.h Examining data/axtls-2.1.5+ds/ssl/tls1.c Examining data/axtls-2.1.5+ds/ssl/test/perf_bigint.c Examining data/axtls-2.1.5+ds/ssl/test/ssltest.c Examining data/axtls-2.1.5+ds/ssl/gen_cert.c Examining data/axtls-2.1.5+ds/ssl/loader.c Examining data/axtls-2.1.5+ds/ssl/tls1_svr.c Examining data/axtls-2.1.5+ds/ssl/private_key.h Examining data/axtls-2.1.5+ds/ssl/tls1.h Examining data/axtls-2.1.5+ds/httpd/proc.c Examining data/axtls-2.1.5+ds/httpd/axhttp.h Examining data/axtls-2.1.5+ds/httpd/htpasswd.c Examining data/axtls-2.1.5+ds/httpd/tdate_parse.c Examining data/axtls-2.1.5+ds/httpd/axhttpd.c Examining data/axtls-2.1.5+ds/debian/config/config.h FINAL RESULTS: data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:103:6: [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(argv[1], X_OK) != 0) data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:394:2: [4] (shell) execv: 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. execv(argv[1], argv + 1); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:44:3: [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(res_value, sym_get_string_value(sym)); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:47:2: [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(res_value, in); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:61:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s/%s", env, name); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:289:4: [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(dirname, name); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:305:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newname, "config/%s.tmpconfig.%d", dirname, (int)getpid()); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:448:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmpname, "%s.old", name); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:451:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmpname, "%s%s", dirname, basename); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:107:2: [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 (instr, init); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c:204:5: [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 (tempstr, prompt); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:338:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. res = vsnprintf(items[item_no - 1]->name + items[item_no - 1]->namelen, data/axtls-2.1.5+ds/config/scripts/config/mconf.c:355:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. res = vsnprintf(items[item_no - 1]->tag, 32, fmt, ap); data/axtls-2.1.5+ds/config/scripts/config/menu.c:23:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/axtls-2.1.5+ds/config/scripts/config/menu.c:33:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/axtls-2.1.5+ds/config/scripts/config/symbol.c:543:2: [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(val, newval); data/axtls-2.1.5+ds/config/scripts/config/util.c:90:2: [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(gs->s, s); data/axtls-2.1.5+ds/config/scripts/config/util.c:99:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(s, sizeof(s), fmt, ap); data/axtls-2.1.5+ds/crypto/crypto_misc.c:279:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s\n", format); data/axtls-2.1.5+ds/crypto/crypto_misc.c:280:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(tmp, ap); data/axtls-2.1.5+ds/httpd/axhttpd.c:584:5: [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(path, tpbuf); data/axtls-2.1.5+ds/httpd/axhttpd.c:633:5: [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(tp->remote_addr, ip); data/axtls-2.1.5+ds/httpd/htpasswd.c:81:15: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. static char * getpass(const char *prompt) data/axtls-2.1.5+ds/httpd/htpasswd.c:86:5: [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(prompt); TTY_FLUSH(); data/axtls-2.1.5+ds/httpd/htpasswd.c:116:17: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. pw = strdup(getpass("New password:")); data/axtls-2.1.5+ds/httpd/htpasswd.c:117:20: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. if (strcmp(pw, getpass("Re-type new password:")) != 0) data/axtls-2.1.5+ds/httpd/proc.c:189:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), HTTP_VERSION data/axtls-2.1.5+ds/httpd/proc.c:201:5: [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(actualfile, cn->actualfile); data/axtls-2.1.5+ds/httpd/proc.c:220:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), HTTP_VERSION data/axtls-2.1.5+ds/httpd/proc.c:458:13: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), HTTP_VERSION" 304 Not Modified\nServer: " data/axtls-2.1.5+ds/httpd/proc.c:491:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), HTTP_VERSION" 200 OK\nServer: %s\n" data/axtls-2.1.5+ds/httpd/proc.c:589:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(cgienv[0], MAXREQUESTLENGTH, data/axtls-2.1.5+ds/httpd/proc.c:684:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cgienv[cgi_index++], "SERVER_SOFTWARE=%s", server_version); data/axtls-2.1.5+ds/httpd/proc.c:685:5: [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(cgienv[cgi_index++], "DOCUMENT_ROOT=" CONFIG_HTTP_WEBROOT); data/axtls-2.1.5+ds/httpd/proc.c:724:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cgienv[cgi_index++], "REQUEST_METHOD=%s", type); data/axtls-2.1.5+ds/httpd/proc.c:1055:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), HTTP_VERSION" 401 Unauthorized\n" data/axtls-2.1.5+ds/httpd/proc.c:1199:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), HTTP_VERSION" 200 OK\n" data/axtls-2.1.5+ds/ssl/gen_cert.c:145:5: [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((char *)&buf[*offset], name); data/axtls-2.1.5+ds/ssl/openssl.c:300:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(f, format, ap); data/axtls-2.1.5+ds/ssl/os_port.h:90:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/axtls-2.1.5+ds/ssl/os_port.h:90:33: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/axtls-2.1.5+ds/ssl/test/ssltest.c:61:33: [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. #define SYSTEM(A) if (system(A) < 0) printf("system call error\n"); data/axtls-2.1.5+ds/ssl/test/ssltest.c:964:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(openssl_buf, "echo \"hello client\" | openssl s_client " data/axtls-2.1.5+ds/ssl/test/ssltest.c:970:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(openssl_buf, "echo \"hello client\" | openssl s_client " data/axtls-2.1.5+ds/ssl/test/ssltest.c:980:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(openssl_buf, "echo \"hello client\" | gnutls-cli --insecure --verify-allow-broken " data/axtls-2.1.5+ds/ssl/test/ssltest.c:1550:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(openssl_buf, "gnutls-serv " data/axtls-2.1.5+ds/ssl/test/ssltest.c:1555:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(openssl_buf, "openssl s_server " data/axtls-2.1.5+ds/ssl/test/ssltest.c:2085:5: [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(ret == SSL_OK && offset == sizeof(basic_buf) ? data/axtls-2.1.5+ds/ssl/test/ssltest.c:2218:5: [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(ret == SSL_OK && offset == sizeof(basic_buf) ? data/axtls-2.1.5+ds/ssl/tls1.c:956: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((char *)q, label); data/axtls-2.1.5+ds/ssl/tls1.c:2132:5: [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(not_ok ? "Error - invalid State:\t" : "State:\t"); data/axtls-2.1.5+ds/ssl/tls1.c:2133:5: [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(is_send ? "sending " : "receiving "); data/axtls-2.1.5+ds/config/scripts/config/conf.c:145:21: [3] (random) random: 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. val = (tristate)(random() % 3); data/axtls-2.1.5+ds/config/scripts/config/conf.c:365:11: [3] (random) random: 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. def = (random() % cnt) + 1; data/axtls-2.1.5+ds/config/scripts/config/conf.c:523:4: [3] (random) srandom: 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. srandom(time(NULL)); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:59: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. env = getenv(SRCTREE); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:326: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. getenv("VERSION"), data/axtls-2.1.5+ds/config/scripts/config/confdata.c:327: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. getenv("BUILDTIME")); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:328:7: [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("EXTRA_VERSION")) data/axtls-2.1.5+ds/config/scripts/config/confdata.c:330: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. getenv("EXTRA_VERSION")); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:291: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. env = getenv("LINES"); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:298: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. env = getenv("COLUMNS"); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:946: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. mode = getenv("MENUCONFIG_MODE"); data/axtls-2.1.5+ds/config/scripts/config/symbol.c:57: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. p = getenv("VERSION"); data/axtls-2.1.5+ds/config/scripts/config/symbol.c:64: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. p = getenv("TARGET_ARCH"); data/axtls-2.1.5+ds/ssl/os_port.h:87:9: [3] (random) srandom: 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. #define srandom(A) srand(A) data/axtls-2.1.5+ds/ssl/os_port.h:87:33: [3] (random) srand: 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. #define srandom(A) srand(A) data/axtls-2.1.5+ds/ssl/os_port.h:88:9: [3] (random) random: 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. #define random() rand() data/axtls-2.1.5+ds/ssl/os_port.h:100:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. #define chroot(A) _chdir(A) data/axtls-2.1.5+ds/ssl/test/ssltest.c:2572: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. if (!getenv("NONETWORK")) { data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:73:18: [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). opt_timeout = atoi(argv[2]); data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:166:8: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. pid = vfork(); data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:176:19: [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 unsigned char writebuf[4096]; data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:201: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(readbuf, readpt, readlen); data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:347: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(readbuf, readpt, readlen); data/axtls-2.1.5+ds/config/scripts/config/conf.c:34: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. static char line[128]; data/axtls-2.1.5+ds/config/scripts/config/conf.c:360:11: [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). cnt = atoi(line); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:30: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 res_value[SYMBOL_MAXLENGTH]; data/axtls-2.1.5+ds/config/scripts/config/confdata.c:31: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 *dst, name[SYMBOL_MAXLENGTH]; data/axtls-2.1.5+ds/config/scripts/config/confdata.c:55: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 fullname[PATH_MAX+1]; data/axtls-2.1.5+ds/config/scripts/config/confdata.c:71: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 line[1024]; data/axtls-2.1.5+ds/config/scripts/config/confdata.c:279: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 dirname[128], tmpname[128], newname[128]; data/axtls-2.1.5+ds/config/scripts/config/confdata.c:294: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(dirname, name, size); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:306: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). out = fopen(newname, "w"); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:311:11: [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). out_h = fopen("config/.tmpconfig.h", "w"); data/axtls-2.1.5+ds/config/scripts/config/expr.c:75: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(e, org, sizeof(*org)); data/axtls-2.1.5+ds/config/scripts/config/expr.c:1071: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[32]; data/axtls-2.1.5+ds/config/scripts/config/expr.c:1072: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, "<unknown type %d>", e->type); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/checklist.c:170: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( title2, title, width-2 ); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/colors.h:156: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 name[COLOR_NAME_LEN]; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:24: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. unsigned char dialog_input_result[MAX_LEN + 1]; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:75: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( title2, title, width-2 ); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:70: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 menu_item[menu_width+1]; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:198: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( title2, title, width-2 ); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:239:13: [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 ( (f=fopen("lxdialog.scrltmp","r")) != NULL ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:403:14: [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 ( (f=fopen("lxdialog.scrltmp","w")) != NULL ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/msgbox.c:49: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( title2, title, width-2 ); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:42: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 search_term[MAX_LEN + 1]; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:48:15: [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). if ((fd = open (file, O_RDONLY)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:112: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( title2, title, width-2 ); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:493:12: [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 line[MAX_LEN + 1]; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c:202: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 tempstr[MAX_LEN + 1], *word, *sp, *sp2; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/yesno.c:69: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( title2, title, width-2 ); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:31: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. static char menu_backtitle[128]; data/axtls-2.1.5+ds/config/scripts/config/mconf.c:259: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. static char filename[PATH_MAX+1] = ".config"; data/axtls-2.1.5+ds/config/scripts/config/mconf.c:293:11: [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). rows = atoi(env); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:300:11: [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). cols = atoi(env); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:630: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 active_entry[40]; data/axtls-2.1.5+ds/config/scripts/config/util.c:37: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). out = fopen("config/.config.tmp", "w"); data/axtls-2.1.5+ds/config/scripts/config/util.c:97: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 s[10000]; /* big enough... */ data/axtls-2.1.5+ds/crypto/aes.c:153:23: [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 const unsigned char Rcon[30]= data/axtls-2.1.5+ds/crypto/aes.c:244: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(ctx->iv, iv, 16); data/axtls-2.1.5+ds/crypto/aes.c:274: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(iv, ctx->iv, AES_IV_SIZE); data/axtls-2.1.5+ds/crypto/aes.c:282: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(msg_32, msg, AES_BLOCKSIZE); data/axtls-2.1.5+ds/crypto/aes.c:296: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(out, out_32, AES_BLOCKSIZE); data/axtls-2.1.5+ds/crypto/aes.c:302: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(ctx->iv, iv, AES_IV_SIZE); data/axtls-2.1.5+ds/crypto/aes.c:313: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(iv, ctx->iv, AES_IV_SIZE); data/axtls-2.1.5+ds/crypto/aes.c:321: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(msg_32, msg, AES_BLOCKSIZE); data/axtls-2.1.5+ds/crypto/aes.c:339: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(out, out_32, AES_BLOCKSIZE); data/axtls-2.1.5+ds/crypto/aes.c:345: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(ctx->iv, iv, AES_IV_SIZE); data/axtls-2.1.5+ds/crypto/bigint.c:265: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(biR->comps, bi->comps, bi->size*COMP_BYTE_SIZE); data/axtls-2.1.5+ds/crypto/bigint.c:436: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(tmp_u->comps, &u->comps[u->size-n-1-j], (n+1)*COMP_BYTE_SIZE); data/axtls-2.1.5+ds/crypto/bigint.c:488: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(&u->comps[u->size-n-1-j], tmp_u->comps, (n+1)*COMP_BYTE_SIZE); data/axtls-2.1.5+ds/crypto/crypto_misc.c:71:20: [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). FILE *stream = fopen(filename, "rb"); data/axtls-2.1.5+ds/crypto/crypto_misc.c:107:14: [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). rng_fd = open("/dev/urandom", O_RDONLY); data/axtls-2.1.5+ds/crypto/crypto_misc.c:126: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(entropy_pool, &i, ENTROPY_POOL_SIZE); data/axtls-2.1.5+ds/crypto/crypto_misc.c:191: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(rand_data, entropy_pool, num_rand_bytes < ENTROPY_POOL_SIZE ? data/axtls-2.1.5+ds/crypto/crypto_misc.c:200: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(entropy_pool, digest, MD5_SIZE); data/axtls-2.1.5+ds/crypto/crypto_misc.c:275: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 tmp[80]; data/axtls-2.1.5+ds/crypto/hmac.c:55: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(k_ipad, key, key_len); data/axtls-2.1.5+ds/crypto/hmac.c:56: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(k_opad, key, key_len); data/axtls-2.1.5+ds/crypto/hmac.c:88: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(k_ipad, key, key_len); data/axtls-2.1.5+ds/crypto/hmac.c:89: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(k_opad, key, key_len); data/axtls-2.1.5+ds/crypto/hmac.c:121: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(k_ipad, key, key_len); data/axtls-2.1.5+ds/crypto/hmac.c:122: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(k_opad, key, key_len); data/axtls-2.1.5+ds/crypto/md5.c:139: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(&ctx->buffer[x], msg, partLen); data/axtls-2.1.5+ds/crypto/md5.c:151: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(&ctx->buffer[x], &msg[i], len-i); data/axtls-2.1.5+ds/crypto/rsa.c:199: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(out_data, &block[i], size); data/axtls-2.1.5+ds/crypto/rsa.c:271:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&out_data[3+num_pads_needed], in_data, in_len); data/axtls-2.1.5+ds/crypto/sha256.c:224: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((void *) (ctx->buffer + left), (void *)msg, fill); data/axtls-2.1.5+ds/crypto/sha256.c:240: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((void *) (ctx->buffer + left), (void *) msg, len); data/axtls-2.1.5+ds/crypto/sha384.c:75: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(digest, ctx->h_dig.digest, SHA384_SIZE); data/axtls-2.1.5+ds/crypto/sha512.c:166: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(ctx->w_buf.buffer + ctx->size, msg, n); data/axtls-2.1.5+ds/crypto/sha512.c:218: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(digest, ctx->h_dig.digest, SHA512_SIZE); data/axtls-2.1.5+ds/httpd/axhttp.h:81: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 actualfile[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:82: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 filereq[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:83: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 dirname[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:84: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 server_name[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:86: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 databuf[BLOCKSIZE]; data/axtls-2.1.5+ds/httpd/axhttp.h:94: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 cgicontenttype[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:96: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 remote_addr[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:97: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 uri_request[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:98: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 uri_path_info[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:99: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 uri_query[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:100: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 cookie[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttp.h:103: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 authorization[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/axhttpd.c:165:28: [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). httpPort = atoi(portStr + 1); data/axtls-2.1.5+ds/httpd/axhttpd.c:168:28: [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). httpPort = atoi(argv[i+1]); data/axtls-2.1.5+ds/httpd/axhttpd.c:180:29: [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). httpsPort = atoi(portStr + 1); data/axtls-2.1.5+ds/httpd/axhttpd.c:183:29: [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). httpsPort = atoi(argv[i+1]); data/axtls-2.1.5+ds/httpd/axhttpd.c:499: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 ipbuf[100]; data/axtls-2.1.5+ds/httpd/axhttpd.c:583: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 path[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/htpasswd.c:41:18: [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 const char b64str[64] = data/axtls-2.1.5+ds/httpd/htpasswd.c:83:12: [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[127]; data/axtls-2.1.5+ds/httpd/htpasswd.c:88: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("/dev/tty", "w"); data/axtls-2.1.5+ds/httpd/htpasswd.c:110: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 b64_salt[MD5_SIZE+10], b64_pass[MD5_SIZE+10]; data/axtls-2.1.5+ds/httpd/proc.c:75:12: [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). axdout = fopen("/var/log/axdebug", "a"); \ data/axtls-2.1.5+ds/httpd/proc.c:184: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 buf[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:185: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 actualfile[1024]; data/axtls-2.1.5+ds/httpd/proc.c:234: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 buf[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:235: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 encbuf[1024]; data/axtls-2.1.5+ds/httpd/proc.c:302: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((char *)tp, "%%%02X", *p); data/axtls-2.1.5+ds/httpd/proc.c:319: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 buf[MAXREADLENGTH], *tp, *next; data/axtls-2.1.5+ds/httpd/proc.c:380: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 buf[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:384: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 date[32]; data/axtls-2.1.5+ds/httpd/proc.c:385: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 last_modified[32]; data/axtls-2.1.5+ds/httpd/proc.c:386: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 expires[32]; data/axtls-2.1.5+ds/httpd/proc.c:421:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tbuf[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:477:24: [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). cn->filedesc = open(cn->actualfile, flags); data/axtls-2.1.5+ds/httpd/proc.c:579: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 *myargs[3]; data/axtls-2.1.5+ds/httpd/proc.c:580: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 cgienv[CGI_ARG_SIZE][MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:581: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 * cgiptr[CGI_ARG_SIZE+4]; data/axtls-2.1.5+ds/httpd/proc.c:628:16: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if ((pid = vfork()) > 0) /* parent */ data/axtls-2.1.5+ds/httpd/proc.c:688:5: [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(cgienv[cgi_index++], "SERVER_PORT=%d", data/axtls-2.1.5+ds/httpd/proc.c:716: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(cgienv[cgi_index++], data/axtls-2.1.5+ds/httpd/proc.c:727:9: [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(cgienv[cgi_index++], "HTTPS=on"); data/axtls-2.1.5+ds/httpd/proc.c:864: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 buf[MAXREADLENGTH], *next; data/axtls-2.1.5+ds/httpd/proc.c:972:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char curr_dir[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:973:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:983: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(cn->actualfile, path, MAXREQUESTLENGTH); data/axtls-2.1.5+ds/httpd/proc.c:1045: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 pathname[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:1047:12: [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). return fopen(pathname, "r"); data/axtls-2.1.5+ds/httpd/proc.c:1053: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 buf[1024]; data/axtls-2.1.5+ds/httpd/proc.c:1093: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 line[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:1143: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 line[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:1169: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 buf[MAXREQUESTLENGTH]; data/axtls-2.1.5+ds/httpd/proc.c:1246:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, read_buf, res > (int)count ? count : res); data/axtls-2.1.5+ds/httpd/tdate_parse.c:85: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 str_mon[4], str_wday[4]; data/axtls-2.1.5+ds/samples/c/axssl.c:141:20: [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). port = atoi(argv[++i]); data/axtls-2.1.5+ds/samples/c/axssl.c:478:20: [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). port = atoi(ptr); data/axtls-2.1.5+ds/samples/c/axssl.c:657:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(session_id, ssl_get_session_id(ssl), SSL_SESSION_ID_SIZE); data/axtls-2.1.5+ds/ssl/asn1.c:169: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(*object, &buf[*offset], len); data/axtls-2.1.5+ds/ssl/asn1.c:464: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(*str, &buf[*offset], len); data/axtls-2.1.5+ds/ssl/asn1.c:572: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(x509_ctx->signature, &cert[*offset], x509_ctx->sig_len); data/axtls-2.1.5+ds/ssl/crypto_misc.h:90: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 *ca_cert_dn[X509_NUM_DN_TYPES]; data/axtls-2.1.5+ds/ssl/crypto_misc.h:91: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 *cert_dn[X509_NUM_DN_TYPES]; data/axtls-2.1.5+ds/ssl/gen_cert.c:104: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(&buf[*offset], ser_oid , sizeof(ser_oid)); data/axtls-2.1.5+ds/ssl/gen_cert.c:118: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(&buf[*offset], sig_oid, sizeof(sig_oid)); data/axtls-2.1.5+ds/ssl/gen_cert.c:158: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 fqdn[128]; data/axtls-2.1.5+ds/ssl/gen_cert.c:217: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(&buf[*offset], time_seq, sizeof(time_seq)); data/axtls-2.1.5+ds/ssl/gen_cert.c:244: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(&buf[*offset], block, pub_key_size); data/axtls-2.1.5+ds/ssl/gen_cert.c:246: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(&buf[*offset], pub_key_seq, sizeof(pub_key_seq)); data/axtls-2.1.5+ds/ssl/gen_cert.c:275: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(&buf[*offset], rsa_enc_oid, sizeof(rsa_enc_oid)); data/axtls-2.1.5+ds/ssl/gen_cert.c:296: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(block, asn1_sig, sizeof(asn1_sig)); data/axtls-2.1.5+ds/ssl/gen_cert.c:297: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(&block[sizeof(asn1_sig)], sha_dgst, SHA1_SIZE); data/axtls-2.1.5+ds/ssl/gen_cert.c:305: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(&buf[*offset], enc_block, sig_size); data/axtls-2.1.5+ds/ssl/gen_cert.c:363: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(*cert_data, buf, offset); data/axtls-2.1.5+ds/ssl/loader.c:116: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(ssl_obj->buf, data, len); data/axtls-2.1.5+ds/ssl/loader.c:191:14: [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 const char * const begins[NUM_PEM_TYPES] = data/axtls-2.1.5+ds/ssl/loader.c:199:14: [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 const char * const ends[NUM_PEM_TYPES] = data/axtls-2.1.5+ds/ssl/loader.c:207:14: [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 const char * const aes_str[2] = data/axtls-2.1.5+ds/ssl/loader.c:237:32: [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. if ((start = strstr((const char *)where, aes_str[0]))) /* AES128? */ data/axtls-2.1.5+ds/ssl/loader.c:241:37: [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. else if ((start = strstr((const char *)where, aes_str[1]))) /* AES256? */ data/axtls-2.1.5+ds/ssl/openssl.c:140: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(buf, read_buf, ret > num ? num : ret); data/axtls-2.1.5+ds/ssl/openssl.c:197: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(ssl->session_id, (uint8_t *)session, SSL_SESSION_ID_SIZE); data/axtls-2.1.5+ds/ssl/openssl.c:240: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(buf, ssl->bm_data, num); data/axtls-2.1.5+ds/ssl/openssl.c:308:16: [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). return fopen("/dev/null", "r"); data/axtls-2.1.5+ds/ssl/os_port.h:77: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). #undef open data/axtls-2.1.5+ds/ssl/os_port.h:91:9: [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(A,B) _open(A,B) data/axtls-2.1.5+ds/ssl/p12.c:224: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(priv_key, Ai, SHA1_SIZE); data/axtls-2.1.5+ds/ssl/p12.c:288: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(auth_safes, &buf[auth_safes_start], auth_safes_len); data/axtls-2.1.5+ds/ssl/test/ssltest.c:959: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 openssl_buf[2048]; data/axtls-2.1.5+ds/ssl/test/ssltest.c:1544: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 openssl_buf[2048]; data/axtls-2.1.5+ds/ssl/test/ssltest.c:1699: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(sess_resume->session_id, data/axtls-2.1.5+ds/ssl/test/ssltest.c:2250: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 tmp[5]; data/axtls-2.1.5+ds/ssl/test/ssltest.c:2264:5: [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(tmp, "%d\n", multi_data->thread_id); data/axtls-2.1.5+ds/ssl/test/ssltest.c:2472: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). fd = open("/dev/null", O_WRONLY); /* write stderr to /dev/null */ data/axtls-2.1.5+ds/ssl/tls1.c:394: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(ssl_cert->buf, buf, len); data/axtls-2.1.5+ds/ssl/tls1.c:695: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(t_buf, (mode == SSL_SERVER_WRITE || mode == SSL_CLIENT_WRITE) ? data/axtls-2.1.5+ds/ssl/tls1.c:697: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(&t_buf[8], hmac_header, SSL_RECORD_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:698: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(&t_buf[8+SSL_RECORD_SIZE], buf, buf_len); data/axtls-2.1.5+ds/ssl/tls1.c:804: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(&a1[MD5_SIZE], seed, seed_len); data/axtls-2.1.5+ds/ssl/tls1.c:815: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(a1, a2, MD5_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:832: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(&a1[SHA1_SIZE], seed, seed_len); data/axtls-2.1.5+ds/ssl/tls1.c:843: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(a1, a2, SHA1_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:860: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(&a1[SHA256_SIZE], seed, seed_len); data/axtls-2.1.5+ds/ssl/tls1.c:871: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(a1, a2, SHA256_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:917:5: [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((char *)buf, "master secret"); data/axtls-2.1.5+ds/ssl/tls1.c:918: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(&buf[13], ssl->dc->client_random, SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:919: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(&buf[45], ssl->dc->server_random, SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:937:5: [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((char *)buf, "key expansion"); data/axtls-2.1.5+ds/ssl/tls1.c:938: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(&buf[13], server_random, SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:939: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(&buf[45], client_random, SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1.c:987: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(digest, mac_buf, dgst_len); data/axtls-2.1.5+ds/ssl/tls1.c:1116: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(ssl->bm_data, in, length); data/axtls-2.1.5+ds/ssl/tls1.c:1170:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t_buf + iv_size, ssl->bm_data, msg_length); data/axtls-2.1.5+ds/ssl/tls1.c:1175:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ssl->bm_data, t_buf, msg_length); data/axtls-2.1.5+ds/ssl/tls1.c:1233: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(ssl->client_mac, q, ciph_info->digest_size); data/axtls-2.1.5+ds/ssl/tls1.c:1240: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(ssl->server_mac, q, ciph_info->digest_size); data/axtls-2.1.5+ds/ssl/tls1.c:1244: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(client_key, q, ciph_info->key_size); data/axtls-2.1.5+ds/ssl/tls1.c:1246: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(server_key, q, ciph_info->key_size); data/axtls-2.1.5+ds/ssl/tls1.c:1249: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(client_iv, q, ciph_info->iv_size); data/axtls-2.1.5+ds/ssl/tls1.c:1251: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(server_iv, q, ciph_info->iv_size); data/axtls-2.1.5+ds/ssl/tls1.c:1355: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(ssl->hmac_header, buf, 3); /* store for hmac */ data/axtls-2.1.5+ds/ssl/tls1.c:1548: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(ssl->session->master_secret, data/axtls-2.1.5+ds/ssl/tls1.c:1711: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(&buf[offset], cert->buf, cert->size); data/axtls-2.1.5+ds/ssl/tls1.c:1797:21: [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(ssl->dc->master_secret, data/axtls-2.1.5+ds/ssl/tls1_clnt.c:80: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(ssl->session_id, session_id, sess_id_size); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:213: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(ssl->dc->client_random, &buf[6], SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:220: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(&buf[offset], ssl->session_id, ssl->sess_id_size); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:251: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(&buf[offset], g_sig_alg, sizeof(g_sig_alg)); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:330: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(ssl->dc->server_random, &buf[6], SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:344: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(ssl->session->session_id, &buf[offset], sess_id_size); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:354: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(ssl->session_id, &buf[offset], sess_id_size); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:496: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(dgst, g_asn1_sha256, sizeof(g_asn1_sha256)); data/axtls-2.1.5+ds/ssl/tls1_svr.c:146: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(ssl->dc->client_random, &buf[6], SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1_svr.c:313: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(ssl->dc->server_random, &buf[6], SSL_RANDOM_SIZE); data/axtls-2.1.5+ds/ssl/tls1_svr.c:321: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(&buf[offset], ssl->session->session_id, SSL_SESSION_ID_SIZE); data/axtls-2.1.5+ds/ssl/tls1_svr.c:322: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(ssl->session_id, ssl->session->session_id, SSL_SESSION_ID_SIZE); data/axtls-2.1.5+ds/ssl/tls1_svr.c:332: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(ssl->session_id, &buf[offset], SSL_SESSION_ID_SIZE); data/axtls-2.1.5+ds/ssl/tls1_svr.c:338:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ssl->session->session_id, data/axtls-2.1.5+ds/ssl/x509.c:242:25: [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(x509_ctx->subject_alt_dnsnames[totalnames], data/axtls-2.1.5+ds/axtlswrap/axtlswrap.c:280:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). writelen = read(crfd, writebuf, sizeof(writebuf)); data/axtls-2.1.5+ds/config/scripts/config/conf.c:46:6: [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(p); data/axtls-2.1.5+ds/config/scripts/config/conf.c:187: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). line[strlen(line)-1] = 0; data/axtls-2.1.5+ds/config/scripts/config/conf.c:384: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). if (line[strlen(line) - 1] == '?') { data/axtls-2.1.5+ds/config/scripts/config/confdata.c:36:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(res_value, in, src - in); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:182:26: [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). memmove(p2, p2 + 1, strlen(p2)); data/axtls-2.1.5+ds/config/scripts/config/confdata.c:290: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(dirname, "/"); data/axtls-2.1.5+ds/config/scripts/config/expr.c:1083: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). fwrite(str, strlen(str), 1, data); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/checklist.c:167:26: [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 != NULL && strlen(title) >= width-2 ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/checklist.c:177: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). mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/checklist.c:201: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). check_x = MAX (check_x, + strlen (items[i]->name) + 4); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:72:26: [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 != NULL && strlen(title) >= width-2 ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:82: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). mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:109: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). input_x = strlen (instr); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/inputbox.c:147: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). input_x = strlen (instr) - scroll; data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:72:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(menu_item, item, menu_width); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:195:26: [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 != NULL && strlen(title) >= width-2 ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:205: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). mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/menubox.c:232:40: [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). item_x = MAX (item_x, MIN(menu_width, strlen (items[i]->name) + 2)); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/msgbox.c:46:26: [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 != NULL && strlen(title) >= width-2 ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/msgbox.c:56: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). mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:73:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:109:26: [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 != NULL && strlen(title) >= width-2 ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:119: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). mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:163:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:196:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:372:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:421:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:466: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). line += MIN (strlen (line), hscroll); /* Scroll horizontally */ data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:469: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). waddnstr (win, line, MIN (strlen (line), width - 2)); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/textbox.c:508:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c:206: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). prompt_len = strlen(tempstr); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c:232: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). wlen = strlen(word); data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c:234:43: [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). (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room data/axtls-2.1.5+ds/config/scripts/config/lxdialog/util.c:347: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). for (i = 0; i < strlen(string); i++) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/yesno.c:66:26: [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 != NULL && strlen(title) >= width-2 ) { data/axtls-2.1.5+ds/config/scripts/config/lxdialog/yesno.c:76: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). mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' '); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:662:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(active_entry, active_item->tag, sizeof(active_entry)); data/axtls-2.1.5+ds/config/scripts/config/mconf.c:739: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). write(fd, text, strlen(text)); data/axtls-2.1.5+ds/config/scripts/config/symbol.c:532: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). size = strlen(newval) + 1; data/axtls-2.1.5+ds/config/scripts/config/symbol.c:661:6: [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(pattern) == 0) data/axtls-2.1.5+ds/config/scripts/config/util.c:60:2: [1] (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 character. strcpy(gs.s, "\0"); data/axtls-2.1.5+ds/config/scripts/config/util.c:69: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). gs.len = strlen(s) + 1; data/axtls-2.1.5+ds/config/scripts/config/util.c:85: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). size_t l = strlen(gs->s) + strlen(s) + 1; data/axtls-2.1.5+ds/config/scripts/config/util.c:85:29: [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 l = strlen(gs->s) + strlen(s) + 1; data/axtls-2.1.5+ds/crypto/bigint.c:654: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). int size = strlen(data); data/axtls-2.1.5+ds/crypto/crypto_misc.c:163:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(rng_fd, rand_data, num_rand_bytes) < 0) data/axtls-2.1.5+ds/httpd/axhttpd.c:575:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, n); data/axtls-2.1.5+ds/httpd/axhttpd.c:587: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 (path[strlen(path)-1] == '\\') data/axtls-2.1.5+ds/httpd/axhttpd.c:588: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). path[strlen(path)-1] = 0; data/axtls-2.1.5+ds/httpd/htpasswd.c:97: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). while (buf[strlen(buf)-1] < ' ') data/axtls-2.1.5+ds/httpd/htpasswd.c:98: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). buf[strlen(buf)-1] = '\0'; data/axtls-2.1.5+ds/httpd/htpasswd.c:135:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). MD5_Update(&ctx, (uint8_t *)pw, strlen(pw)); data/axtls-2.1.5+ds/httpd/proc.c:156:38: [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 (base64_decode(&value[6], strlen(&value[6]), data/axtls-2.1.5+ds/httpd/proc.c:191:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (write(cn->networkdesc, buf, strlen(buf)) < 0) data/axtls-2.1.5+ds/httpd/proc.c:204:5: [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(actualfile, "*"); data/axtls-2.1.5+ds/httpd/proc.c:225: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). special_write(cn, buf, strlen(buf)); data/axtls-2.1.5+ds/httpd/proc.c:249: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). special_write(cn, buf, strlen(buf)); data/axtls-2.1.5+ds/httpd/proc.c:273: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). if (cn->filereq[strlen(cn->filereq)-1] != '/') data/axtls-2.1.5+ds/httpd/proc.c:274:13: [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(cn->filereq, "/"); data/axtls-2.1.5+ds/httpd/proc.c:279:13: [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(file, "/"); data/axtls-2.1.5+ds/httpd/proc.c:284:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } while (special_write(cn, buf, strlen(buf))); data/axtls-2.1.5+ds/httpd/proc.c:460: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). special_write(cn, buf, strlen(buf)); data/axtls-2.1.5+ds/httpd/proc.c:497: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). special_write(cn, buf, strlen(buf)); data/axtls-2.1.5+ds/httpd/proc.c:524:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int rv = read(cn->filedesc, cn->databuf, BLOCKSIZE); data/axtls-2.1.5+ds/httpd/proc.c:592: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). special_write(cn, cgienv[0], strlen(cgienv[0])); data/axtls-2.1.5+ds/httpd/proc.c:761: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). t += strlen(tp->ext); data/axtls-2.1.5+ds/httpd/proc.c:961: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). cn->actualfile[strlen(cn->actualfile)-1] != '/') data/axtls-2.1.5+ds/httpd/proc.c:962:9: [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(cn->actualfile, "/"); data/axtls-2.1.5+ds/httpd/proc.c:965:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cn->dirname, cn->actualfile, MAXREQUESTLENGTH); data/axtls-2.1.5+ds/httpd/proc.c:987: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). cn->actualfile[strlen(cn->actualfile)-1] != '\\') data/axtls-2.1.5+ds/httpd/proc.c:988:13: [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(cn->actualfile, "\\"); data/axtls-2.1.5+ds/httpd/proc.c:991:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cn->dirname, cn->actualfile, MAXREQUESTLENGTH); data/axtls-2.1.5+ds/httpd/proc.c:1008: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). len = strlen(buf); data/axtls-2.1.5+ds/httpd/proc.c:1058: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). special_write(cn, buf, strlen(buf)); data/axtls-2.1.5+ds/httpd/proc.c:1076:29: [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 (base64_decode(salt, strlen(salt), b256_salt, &salt_size)) data/axtls-2.1.5+ds/httpd/proc.c:1079:35: [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 (base64_decode(b64_passwd, strlen(b64_passwd), real_passwd, data/axtls-2.1.5+ds/httpd/proc.c:1086:45: [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). MD5_Update(&ctx, (uint8_t *)msg_passwd, strlen(msg_passwd)); data/axtls-2.1.5+ds/httpd/proc.c:1112: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). int l = strlen(line); data/axtls-2.1.5+ds/httpd/proc.c:1204: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). special_write(cn, buf, strlen(buf)); data/axtls-2.1.5+ds/samples/c/axssl.c:353: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). res = ssl_write(ssl, buf, strlen((char *)buf)+1); data/axtls-2.1.5+ds/samples/c/axssl.c:723:51: [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). res = ssl_write(ssl, buf, strlen((char *)buf)); data/axtls-2.1.5+ds/ssl/gen_cert.c:126: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). int name_size = strlen(name); data/axtls-2.1.5+ds/ssl/gen_cert.c:162:41: [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 (dn[X509_COMMON_NAME] == NULL || strlen(dn[X509_COMMON_NAME]) == 0) data/axtls-2.1.5+ds/ssl/gen_cert.c:166: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). fqdn_len = strlen(fqdn); data/axtls-2.1.5+ds/ssl/gen_cert.c:175: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). fqdn_len = strlen(fqdn); data/axtls-2.1.5+ds/ssl/gen_cert.c:186: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). if (dn[X509_ORGANIZATION] != NULL && strlen(dn[X509_ORGANIZATION]) > 0) data/axtls-2.1.5+ds/ssl/gen_cert.c:193: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). strlen(dn[X509_ORGANIZATIONAL_UNIT]) > 0) data/axtls-2.1.5+ds/ssl/loader.c:229:29: [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 == NULL || strlen(password) == 0) data/axtls-2.1.5+ds/ssl/loader.c:239: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). start += strlen(aes_str[0]); data/axtls-2.1.5+ds/ssl/loader.c:244: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). start += strlen(aes_str[1]); data/axtls-2.1.5+ds/ssl/loader.c:273:53: [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). MD5_Update(&md5_ctx, (const uint8_t *)password, strlen(password)); data/axtls-2.1.5+ds/ssl/loader.c:281: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). MD5_Update(&md5_ctx, (const uint8_t *)password, strlen(password)); data/axtls-2.1.5+ds/ssl/loader.c:316:26: [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). start += strlen(begins[i]); data/axtls-2.1.5+ds/ssl/loader.c:372: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). end += strlen(ends[i]); data/axtls-2.1.5+ds/ssl/loader.c:373: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). remain -= strlen(ends[i]); data/axtls-2.1.5+ds/ssl/loader.c:433: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(CONFIG_SSL_PRIVATE_KEY_LOCATION) > 0) data/axtls-2.1.5+ds/ssl/loader.c:462: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(CONFIG_SSL_X509_CERT_LOCATION)) data/axtls-2.1.5+ds/ssl/os_port.h:95:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read(A,B,C) _read(A,B,C) data/axtls-2.1.5+ds/ssl/os_port.h:98:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. #define usleep(A) Sleep(A/1000) data/axtls-2.1.5+ds/ssl/os_port.h:141:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define SOCKET_READ(A,B,C) read(A,B,C) data/axtls-2.1.5+ds/ssl/p12.c:168: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). uni_pass = (char *)malloc((strlen(password)+1)*2); data/axtls-2.1.5+ds/ssl/p12.c:171:26: [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). for (i = 0; i < (int)strlen(password); i++) data/axtls-2.1.5+ds/ssl/test/perf_bigint.c:71: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). bi_data = bi_import(ctx, (uint8_t *)plaintext, strlen(plaintext)); data/axtls-2.1.5+ds/ssl/test/perf_bigint.c:109: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). bi_data = bi_import(ctx, (uint8_t *)plaintext, strlen(plaintext)); data/axtls-2.1.5+ds/ssl/test/perf_bigint.c:149: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). bi_data = bi_import(ctx, (uint8_t *)plaintext, strlen(plaintext)); data/axtls-2.1.5+ds/ssl/test/perf_bigint.c:192: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). bi_data = bi_import(ctx, (uint8_t *)plaintext, strlen(plaintext)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:198: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). SHA1_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:216: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). SHA1_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:252:54: [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). SHA256_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:270:54: [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). SHA256_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:306:54: [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). SHA384_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:324:54: [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). SHA384_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:359:54: [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). SHA512_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:377:54: [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). SHA512_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:412:51: [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). MD5_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:430:51: [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). MD5_Update(&ctx, (const uint8_t *)in_str, strlen(in_str)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:609: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). bi_data = bi_import(ctx, (uint8_t *)plaintext, strlen(plaintext)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:689:41: [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). (const uint8_t *)plaintext, strlen(plaintext)); data/axtls-2.1.5+ds/ssl/test/ssltest.c:699:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (memcmp(dec_data, plaintext, strlen(plaintext))) data/axtls-2.1.5+ds/ssl/test/ssltest.c:1605:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); /* allow server to start */ data/axtls-2.1.5+ds/ssl/test/ssltest.c:2266:40: [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). ssl_write(ssl, (uint8_t *)tmp, strlen(tmp)+1); data/axtls-2.1.5+ds/ssl/tls1.c:957: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). q += strlen(label); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:261: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). size_t host_len = strlen(ssl->extensions->host_name); data/axtls-2.1.5+ds/ssl/tls1_clnt.c:271:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char*) &buf[offset], ssl->extensions->host_name, host_len); ANALYSIS SUMMARY: Hits = 407 Lines analyzed = 26839 in approximately 0.80 seconds (33701 lines/second) Physical Source Lines of Code (SLOC) = 19323 Hits@level = [0] 488 [1] 125 [2] 212 [3] 18 [4] 52 [5] 0 Hits@level+ = [0+] 895 [1+] 407 [2+] 282 [3+] 70 [4+] 52 [5+] 0 Hits/KSLOC@level+ = [0+] 46.3179 [1+] 21.063 [2+] 14.594 [3+] 3.62263 [4+] 2.69109 [5+] 0 Dot directories skipped = 2 (--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.