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/canl-c-3.0.0/examples/canl_sample_client.c
Examining data/canl-c-3.0.0/examples/canl_sample_server.c
Examining data/canl-c-3.0.0/examples/delegation.c
Examining data/canl-c-3.0.0/examples/grid-proxy-init.c
Examining data/canl-c-3.0.0/src/canl.c
Examining data/canl-c-3.0.0/src/canl_cert.c
Examining data/canl-c-3.0.0/src/canl_cred.c
Examining data/canl-c-3.0.0/src/canl_dns.c
Examining data/canl-c-3.0.0/src/canl_err.c
Examining data/canl-c-3.0.0/src/canl_ocsp.c
Examining data/canl-c-3.0.0/src/canl_ssl.c
Examining data/canl-c-3.0.0/src/canl.h
Examining data/canl-c-3.0.0/src/canl_cred.h
Examining data/canl-c-3.0.0/src/canl_locl.h
Examining data/canl-c-3.0.0/src/canl_mech_ssl.h
Examining data/canl-c-3.0.0/src/canl_ocsp.h
Examining data/canl-c-3.0.0/src/canl_ssl.h
Examining data/canl-c-3.0.0/src/proxy/data.c
Examining data/canl-c-3.0.0/src/proxy/doio.c
Examining data/canl-c-3.0.0/src/proxy/evaluate.c
Examining data/canl-c-3.0.0/src/proxy/list.c
Examining data/canl-c-3.0.0/src/proxy/normalize.c
Examining data/canl-c-3.0.0/src/proxy/proxycertinfo.c
Examining data/canl-c-3.0.0/src/proxy/scutils.c
Examining data/canl-c-3.0.0/src/proxy/sslutils.c
Examining data/canl-c-3.0.0/src/proxy/config.h
Examining data/canl-c-3.0.0/src/proxy/doio.h
Examining data/canl-c-3.0.0/src/proxy/listfunc.h
Examining data/canl-c-3.0.0/src/proxy/myproxycertinfo.h
Examining data/canl-c-3.0.0/src/proxy/normalize.h
Examining data/canl-c-3.0.0/src/proxy/parsertypes.h
Examining data/canl-c-3.0.0/src/proxy/pkcs11.h
Examining data/canl-c-3.0.0/src/proxy/scutils.h
Examining data/canl-c-3.0.0/src/proxy/sslutils.h
Examining data/canl-c-3.0.0/src/proxy/vomsproxy.h

FINAL RESULTS:

data/canl-c-3.0.0/src/canl_ssl.c:85:54:  [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 (!(*m_glb_ctx)->ca_file && ca_cert_fn && !access(ca_cert_fn, R_OK)) {
data/canl-c-3.0.0/src/canl_ssl.c:90:55:  [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 (!(*m_glb_ctx)->ca_dir && ca_cert_dirn && !access(ca_cert_dirn, R_OK)) {
data/canl-c-3.0.0/src/canl_ssl.c:181:45:  [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 (user_cert_fn && user_key_fn && !access(user_cert_fn, R_OK) && 
data/canl-c-3.0.0/src/canl_ssl.c:182:18:  [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.
                !access(user_key_fn, R_OK)) {
data/canl-c-3.0.0/src/canl_ssl.c:284:31:  [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 (user_proxy_fn && !access(user_proxy_fn, R_OK)) {
data/canl-c-3.0.0/src/canl_ssl.c:291:34:  [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 (user_cert_fn && !access(user_cert_fn, R_OK)) {
data/canl-c-3.0.0/src/canl_ssl.c:297:33:  [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 (user_key_fn && !access(user_key_fn, R_OK)) {
data/canl-c-3.0.0/src/proxy/doio.c:41:10:  [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.
  plen = vsnprintf(str, 0, format, v);
data/canl-c-3.0.0/src/proxy/doio.c:46:13:  [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.
      (void)vsnprintf(str, plen+1, format, w);
data/canl-c-3.0.0/src/proxy/sslutils.c:2900:23:  [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(default_user_cert, certname);
data/canl-c-3.0.0/examples/canl_sample_client.c:36:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt(argc, argv, "nhop:s:c:k:t:x:")) != -1) {
data/canl-c-3.0.0/examples/canl_sample_server.c:37:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt(argc, argv, "nhop:c:k:d:t:")) != -1) {
data/canl-c-3.0.0/examples/delegation.c:30:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt(argc, argv, "hc:k:l:b:o:")) != -1) {
data/canl-c-3.0.0/examples/grid-proxy-init.c:25:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt(argc, argv, "hc:k:l:b:o:v:")) != -1) {
data/canl-c-3.0.0/src/proxy/evaluate.c:331:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  file = fopen(realpath, "rb");
data/canl-c-3.0.0/src/proxy/evaluate.c:333:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  free(realpath);
data/canl-c-3.0.0/src/proxy/scutils.c:159:22:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
        h_m_pkcs11 = LoadLibrary(val_dllname);
data/canl-c-3.0.0/src/proxy/scutils.c:176:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	    dllname = getenv("PKCS11_LIB");
data/canl-c-3.0.0/src/proxy/scutils.c:328:24:  [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.
  nss_library_params = getenv("PKCS11_INIT_ARGS");
data/canl-c-3.0.0/src/proxy/sslutils.c:497:20:  [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.
        egd_path = getenv("EGD_PATH");
data/canl-c-3.0.0/src/proxy/sslutils.c:2178:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            getenv(X509_CERT_DIR);
data/canl-c-3.0.0/src/proxy/sslutils.c:2539:28:  [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.
        cert_dir = (char *)getenv(X509_CERT_DIR);
data/canl-c-3.0.0/src/proxy/sslutils.c:2559:29:  [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.
        cert_file = (char *)getenv(X509_CERT_FILE);
data/canl-c-3.0.0/src/proxy/sslutils.c:2579:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        home = getenv("HOME");
data/canl-c-3.0.0/src/proxy/sslutils.c:2630:31:  [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.
            globus_location = getenv("GLOBUS_DEPLOY_PATH");
data/canl-c-3.0.0/src/proxy/sslutils.c:2634:35:  [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.
                globus_location = getenv("GLOBUS_LOCATION");
data/canl-c-3.0.0/src/proxy/sslutils.c:2639:35:  [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.
                globus_location = getenv("GSI_DEPLOY_PATH");
data/canl-c-3.0.0/src/proxy/sslutils.c:2644:35:  [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.
                globus_location = getenv("GSI_INSTALL_PATH");
data/canl-c-3.0.0/src/proxy/sslutils.c:2709:30:  [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.
        user_proxy = (char *)getenv(X509_USER_PROXY);
data/canl-c-3.0.0/src/proxy/sslutils.c:2722:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (!user_proxy && !getenv("X509_RUN_AS_SERVER"))
data/canl-c-3.0.0/src/proxy/sslutils.c:2763:33:  [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.
            user_cert = (char *)getenv(X509_USER_CERT);
data/canl-c-3.0.0/src/proxy/sslutils.c:2789:36:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                user_key = (char *)getenv(X509_USER_KEY);
data/canl-c-3.0.0/src/proxy/sslutils.c:2830:28:  [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.
                    home = getenv("HOME");
data/canl-c-3.0.0/src/proxy/sslutils.c:2876:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                    certname = getenv("X509_USER_CRED");
data/canl-c-3.0.0/examples/canl_sample_client.c:18: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[BUF_LEN];
data/canl-c-3.0.0/examples/canl_sample_client.c:47:24:  [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(optarg);
data/canl-c-3.0.0/examples/canl_sample_client.c:65:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                timeout.tv_sec = atoi(optarg);
data/canl-c-3.0.0/examples/canl_sample_client.c:138: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(buf, "This is the testing message to send");
data/canl-c-3.0.0/examples/canl_sample_server.c:25: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[BUF_LEN];
data/canl-c-3.0.0/examples/canl_sample_server.c:47:24:  [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(optarg);
data/canl-c-3.0.0/examples/canl_sample_server.c:59:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                timeout.tv_sec = atoi(optarg);
data/canl-c-3.0.0/examples/canl_sample_server.c: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 str_port[8];
data/canl-c-3.0.0/examples/delegation.c:45: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).
                lifetime = atoi(optarg);
data/canl-c-3.0.0/examples/delegation.c:48:24:  [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).
                bits = atoi(optarg);
data/canl-c-3.0.0/examples/grid-proxy-init.c:40:14:  [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).
		lifetime = atoi(optarg);
data/canl-c-3.0.0/examples/grid-proxy-init.c:43:24:  [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).
                bits = atoi(optarg);
data/canl-c-3.0.0/examples/grid-proxy-init.c:49: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).
                proxyver = atoi(optarg);
data/canl-c-3.0.0/src/canl.c:249: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(&p4->sin_addr, addr, sizeof(struct in_addr));
data/canl-c-3.0.0/src/canl.c:254: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(&p6->sin6_addr, addr, sizeof(struct in6_addr));
data/canl-c-3.0.0/src/canl.c:288: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(&to, timeout, sizeof to);
data/canl-c-3.0.0/src/canl_cert.c:105: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).
    key_file = fopen(key, "rb");
data/canl-c-3.0.0/src/canl_cert.c:148:17:  [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).
    cert_file = fopen(cert, "rb");
data/canl-c-3.0.0/src/canl_cert.c:197:17:  [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).
    cert_file = fopen(file, "rb");
data/canl-c-3.0.0/src/canl_cred.c:475:13:  [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).
    o_ret = open(proxy_file, O_CREAT | O_EXCL |O_WRONLY, S_IRUSR | S_IWUSR);
data/canl-c-3.0.0/src/canl_cred.c:489:21:  [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).
        cert_file = fopen(proxy_file, "wb");
data/canl-c-3.0.0/src/canl_cred.c:491:21:  [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).
        cert_file = fopen(proxy_file, "ab");
data/canl-c-3.0.0/src/canl_dns.c:38:17:  [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(arp->ent->h_addr_list[i], h->h_addr_list[i],
data/canl-c-3.0.0/src/canl_err.c:108: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 code_str[ERR_CODE_LEN];
data/canl-c-3.0.0/src/canl_ocsp.c:261:48:  [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).
    if (!(resp = send_request(req, host, path, atoi(port), ssl, timeout))) {
data/canl-c-3.0.0/src/proxy/evaluate.c:60: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 hash[EVP_MAX_MD_SIZE+1];
data/canl-c-3.0.0/src/proxy/evaluate.c:88: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(hash, "%08lx", hashvalue);
data/canl-c-3.0.0/src/proxy/evaluate.c:331: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).
  file = fopen(realpath, "rb");
data/canl-c-3.0.0/src/proxy/evaluate.c:344: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 hashed[9];
data/canl-c-3.0.0/src/proxy/evaluate.c:346: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 signing[25]   = "/XXXXXXXX.signing_policy";
data/canl-c-3.0.0/src/proxy/evaluate.c:347: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 namespace[21] = "/XXXXXXXX.namespaces";
data/canl-c-3.0.0/src/proxy/list.c:45:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(newvect, vect, (sizeof(char*)*(i-1)));
data/canl-c-3.0.0/src/proxy/pkcs11.h:198: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.
  unsigned char manufacturer_id[32];
data/canl-c-3.0.0/src/proxy/pkcs11.h:200: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.
  unsigned char library_description[32];
data/canl-c-3.0.0/src/proxy/pkcs11.h:215: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.
  unsigned char slot_description[64];
data/canl-c-3.0.0/src/proxy/pkcs11.h:216: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.
  unsigned char manufacturer_id[32];
data/canl-c-3.0.0/src/proxy/pkcs11.h:231: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.
  unsigned char label[32];
data/canl-c-3.0.0/src/proxy/pkcs11.h:232: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.
  unsigned char manufacturer_id[32];
data/canl-c-3.0.0/src/proxy/pkcs11.h:233: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.
  unsigned char model[16];
data/canl-c-3.0.0/src/proxy/pkcs11.h:234: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.
  unsigned char serial_number[16];
data/canl-c-3.0.0/src/proxy/pkcs11.h:248: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.
  unsigned char utc_time[16];
data/canl-c-3.0.0/src/proxy/pkcs11.h:473: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.
  unsigned char year[4];
data/canl-c-3.0.0/src/proxy/pkcs11.h:474: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.
  unsigned char month[2];
data/canl-c-3.0.0/src/proxy/pkcs11.h:475: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.
  unsigned char day[2];
data/canl-c-3.0.0/src/proxy/proxycertinfo.c:121:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(copy, proxypolicy->policy->data, *length);
data/canl-c-3.0.0/src/proxy/proxycertinfo.c:390: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 oid[256];
data/canl-c-3.0.0/src/proxy/scutils.c:146: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 val_dllname[512] = {"NONE"};
data/canl-c-3.0.0/src/proxy/scutils.c:252:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char                         buf[256];
data/canl-c-3.0.0/src/proxy/scutils.c:254: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,"PKCS#11 return=0x%8.8lx",status);
data/canl-c-3.0.0/src/proxy/scutils.c:426: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                                rpin[256];
data/canl-c-3.0.0/src/proxy/sslutils.c:440: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                                buffer[200];
data/canl-c-3.0.0/src/proxy/sslutils.c:892: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.
    unsigned char                       md[SHA_DIGEST_LENGTH];
data/canl-c-3.0.0/src/proxy/sslutils.c:1033: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.
    unsigned char                       md[SHA_DIGEST_LENGTH];
data/canl-c-3.0.0/src/proxy/sslutils.c:1131:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(serial->data+1, md, SHA_DIGEST_LENGTH);
data/canl-c-3.0.0/src/proxy/sslutils.c:2517: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                                val_user_cert[512];
data/canl-c-3.0.0/src/proxy/sslutils.c:2518: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                                val_user_key[512];
data/canl-c-3.0.0/src/proxy/sslutils.c:2519: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                                val_user_proxy[512];
data/canl-c-3.0.0/src/proxy/sslutils.c:2520: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                                val_cert_dir[512];
data/canl-c-3.0.0/src/proxy/sslutils.c:2521: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                                val_cert_file[512];
data/canl-c-3.0.0/src/proxy/sslutils.c:2865:28:  [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).
                  int fd = open(default_user_cert, O_RDONLY);
data/canl-c-3.0.0/src/proxy/sslutils.c:2969: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 buffer[1024];
data/canl-c-3.0.0/src/proxy/sslutils.c:3115: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).
      if((fp = fopen(user_cert,"rb")) == NULL) {
data/canl-c-3.0.0/src/proxy/sslutils.c:3259:17:  [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 ((fp = fopen(user_key,"rb")) == NULL) {
data/canl-c-3.0.0/src/proxy/sslutils.c:3441: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      buff1[32];
data/canl-c-3.0.0/src/proxy/sslutils.c:3461: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(p,str,size);
data/canl-c-3.0.0/src/proxy/sslutils.c:4075: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 s[80];
data/canl-c-3.0.0/examples/canl_sample_client.c:139: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).
    buf_len = strlen(buf) + 1;
data/canl-c-3.0.0/examples/canl_sample_server.c:195:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(buf, "This is a testing message to send", sizeof(buf));
data/canl-c-3.0.0/examples/canl_sample_server.c:196: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).
    buf_len = strlen(buf) + 1;
data/canl-c-3.0.0/src/canl.c:477:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    b_recvd = mech->read(glb_cc, io_cc, io_cc->conn_ctx,
data/canl-c-3.0.0/src/canl_err.c:126: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).
        err_old_msg_len = strlen(ctx->err_msg);
data/canl-c-3.0.0/src/canl_err.c:129: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).
        err_new_msg_len = strlen(new_msg);
data/canl-c-3.0.0/src/canl_err.c:133: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).
    code_len = strlen(code_str);
data/canl-c-3.0.0/src/canl_err.c:135: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).
    separ_len = strlen(separ);
data/canl-c-3.0.0/src/canl_err.c:136:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    separ_2_len = strlen(separ_2);
data/canl-c-3.0.0/src/canl_err.c:146:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(new_error, new_msg, err_new_msg_len + 1);
data/canl-c-3.0.0/src/canl_err.c:147:9:  [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(new_error, separ, separ_len + 1);
data/canl-c-3.0.0/src/canl_err.c:149:5:  [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(new_error, code_str, code_len + 1);
data/canl-c-3.0.0/src/canl_err.c:150:5:  [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(new_error, separ_2, separ_2_len + 1);
data/canl-c-3.0.0/src/canl_err.c:152:9:  [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(new_error, ctx->err_msg, err_old_msg_len + 1);
data/canl-c-3.0.0/src/canl_err.c:173:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(code_str, new_str,
data/canl-c-3.0.0/src/canl_err.c:181:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(code_str, new_str,
data/canl-c-3.0.0/src/canl_err.c:189:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(code_str, new_str,
data/canl-c-3.0.0/src/canl_locl.h:108:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t (*read)
data/canl-c-3.0.0/src/canl_ocsp.c:45:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(url);
data/canl-c-3.0.0/src/canl_ocsp.c:49:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ocspreq->url, url, len + 1);
data/canl-c-3.0.0/src/canl_ssl.c:149: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).
    fn_len = strlen(ca_dir);
data/canl-c-3.0.0/src/canl_ssl.c:154:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (*target, ca_dir, fn_len + 1);
data/canl-c-3.0.0/src/proxy/evaluate.c:128:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(pattern);
data/canl-c-3.0.0/src/proxy/evaluate.c:356:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(signing + 1, hash, 8);
data/canl-c-3.0.0/src/proxy/evaluate.c:357:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(namespace + 1, hash, 8);
data/canl-c-3.0.0/src/proxy/normalize.c:44: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).
    tmp = snprintf_wrap("%s%s%s", copy, to, pos + strlen(from));
data/canl-c-3.0.0/src/proxy/normalize.c:49: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).
    pos = strstr(copy + strlen(to), from);
data/canl-c-3.0.0/src/proxy/proxycertinfo.c:401:64:  [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).
    output = snprintf_wrap("Path Length Constraint: %s%s\n\n", strlen(buffer)%2 ? "0" : "", buffer);
data/canl-c-3.0.0/src/proxy/scutils.c:459:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                       (CK_CHAR_PTR)pin, strlen(pin));
data/canl-c-3.0.0/src/proxy/scutils.c:674:7:  [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(mylabel)) {
data/canl-c-3.0.0/src/proxy/scutils.c:677: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).
    template[ai].ulValueLen = strlen(mylabel) +
data/canl-c-3.0.0/src/proxy/scutils.c:827:7:  [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(mylabel)) {
data/canl-c-3.0.0/src/proxy/scutils.c:830: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).
    template[ai].ulValueLen = strlen(mylabel) + HACK_PKCS11_LOCAL_STRING_NULL;
data/canl-c-3.0.0/src/proxy/sslutils.c:2902:67:  [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).
                    default_user_key = strndup(default_user_cert, strlen(default_user_cert));
data/canl-c-3.0.0/src/proxy/sslutils.c:2984: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).
        sz = strlen(buffer);
data/canl-c-3.0.0/src/proxy/sslutils.c:3660: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 (strcmp(certname + strlen(certname) - 4, ".p12")) {
data/canl-c-3.0.0/src/proxy/sslutils.c:3836: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).
  char *buffername = (char*)malloc(strlen(dnstring)+1);
data/canl-c-3.0.0/src/proxy/sslutils.c:3837: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).
  unsigned char *buffervalue = (unsigned char*)malloc(strlen(dnstring)+1);
data/canl-c-3.0.0/src/proxy/sslutils.c:3912:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen((char*)buffervalue) == 0)
data/canl-c-3.0.0/src/proxy/sslutils.c:4180: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).
                    && (strlen(cert_subjectdn) > strlen("/cn=proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4180:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    && (strlen(cert_subjectdn) > strlen("/cn=proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4181: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).
                    && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4181:77:  [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).
                    && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4190: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).
                    && (strlen(cert_subjectdn) > strlen("/cn=limited proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4190:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    && (strlen(cert_subjectdn) > strlen("/cn=limited proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4191: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).
                    && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=limited proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4191:77:  [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).
                    && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=limited proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4215:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len_subject_dn = strlen(cert_subjectdn);
data/canl-c-3.0.0/src/proxy/sslutils.c:4216:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len_issuer_dn  = strlen(cert_issuerdn);
data/canl-c-3.0.0/src/proxy/sslutils.c:4230: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).
            && (strlen(cert_subjectdn) > strlen("/cn=proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4230: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).
            && (strlen(cert_subjectdn) > strlen("/cn=proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4231:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4231:69:  [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).
            && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4240: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).
            && (strlen(cert_subjectdn) > strlen("/cn=limited proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4240: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).
            && (strlen(cert_subjectdn) > strlen("/cn=limited proxy"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4241:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=limited proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4241:69:  [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).
            && (tail_str = &cert_subjectdn[strlen(cert_subjectdn) - strlen("/cn=limited proxy")])
data/canl-c-3.0.0/src/proxy/sslutils.c:4253: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).
            && (strlen(cert_subjectdn) > strlen("/cn=0123456789"))
data/canl-c-3.0.0/src/proxy/sslutils.c:4253: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).
            && (strlen(cert_subjectdn) > strlen("/cn=0123456789"))

ANALYSIS SUMMARY:

Hits = 159
Lines analyzed = 14706 in approximately 0.33 seconds (44233 lines/second)
Physical Source Lines of Code (SLOC) = 10634
Hits@level = [0]  91 [1]  59 [2]  66 [3]  24 [4]  10 [5]   0
Hits@level+ = [0+] 250 [1+] 159 [2+] 100 [3+]  34 [4+]  10 [5+]   0
Hits/KSLOC@level+ = [0+] 23.5095 [1+] 14.952 [2+] 9.4038 [3+] 3.19729 [4+] 0.94038 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.