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/gssproxy-0.8.2/rpcgen/gp_rpc.h
Examining data/gssproxy-0.8.2/rpcgen/gp_rpc_xdr.c
Examining data/gssproxy-0.8.2/rpcgen/gp_xdr.c
Examining data/gssproxy-0.8.2/rpcgen/gp_xdr.h
Examining data/gssproxy-0.8.2/rpcgen/gss_proxy.h
Examining data/gssproxy-0.8.2/rpcgen/gss_proxy_xdr.c
Examining data/gssproxy-0.8.2/src/client/gpm_accept_sec_context.c
Examining data/gssproxy-0.8.2/src/client/gpm_acquire_cred.c
Examining data/gssproxy-0.8.2/src/client/gpm_common.c
Examining data/gssproxy-0.8.2/src/client/gpm_display_status.c
Examining data/gssproxy-0.8.2/src/client/gpm_get_mic.c
Examining data/gssproxy-0.8.2/src/client/gpm_import_and_canon_name.c
Examining data/gssproxy-0.8.2/src/client/gpm_indicate_mechs.c
Examining data/gssproxy-0.8.2/src/client/gpm_init_sec_context.c
Examining data/gssproxy-0.8.2/src/client/gpm_inquire_context.c
Examining data/gssproxy-0.8.2/src/client/gpm_release_handle.c
Examining data/gssproxy-0.8.2/src/client/gpm_unwrap.c
Examining data/gssproxy-0.8.2/src/client/gpm_verify_mic.c
Examining data/gssproxy-0.8.2/src/client/gpm_wrap.c
Examining data/gssproxy-0.8.2/src/client/gpm_wrap_size_limit.c
Examining data/gssproxy-0.8.2/src/client/gssapi_gpm.h
Examining data/gssproxy-0.8.2/src/gp_common.h
Examining data/gssproxy-0.8.2/src/gp_config.c
Examining data/gssproxy-0.8.2/src/gp_config.h
Examining data/gssproxy-0.8.2/src/gp_conv.c
Examining data/gssproxy-0.8.2/src/gp_conv.h
Examining data/gssproxy-0.8.2/src/gp_creds.c
Examining data/gssproxy-0.8.2/src/gp_creds.h
Examining data/gssproxy-0.8.2/src/gp_debug.c
Examining data/gssproxy-0.8.2/src/gp_debug.h
Examining data/gssproxy-0.8.2/src/gp_export.c
Examining data/gssproxy-0.8.2/src/gp_export.h
Examining data/gssproxy-0.8.2/src/gp_init.c
Examining data/gssproxy-0.8.2/src/gp_log.c
Examining data/gssproxy-0.8.2/src/gp_log.h
Examining data/gssproxy-0.8.2/src/gp_proxy.h
Examining data/gssproxy-0.8.2/src/gp_rpc_accept_sec_context.c
Examining data/gssproxy-0.8.2/src/gp_rpc_acquire_cred.c
Examining data/gssproxy-0.8.2/src/gp_rpc_creds.h
Examining data/gssproxy-0.8.2/src/gp_rpc_debug.c
Examining data/gssproxy-0.8.2/src/gp_rpc_debug.h
Examining data/gssproxy-0.8.2/src/gp_rpc_get_mic.c
Examining data/gssproxy-0.8.2/src/gp_rpc_import_and_canon_name.c
Examining data/gssproxy-0.8.2/src/gp_rpc_indicate_mechs.c
Examining data/gssproxy-0.8.2/src/gp_rpc_init_sec_context.c
Examining data/gssproxy-0.8.2/src/gp_rpc_process.c
Examining data/gssproxy-0.8.2/src/gp_rpc_process.h
Examining data/gssproxy-0.8.2/src/gp_rpc_release_handle.c
Examining data/gssproxy-0.8.2/src/gp_rpc_unwrap.c
Examining data/gssproxy-0.8.2/src/gp_rpc_verify_mic.c
Examining data/gssproxy-0.8.2/src/gp_rpc_wrap.c
Examining data/gssproxy-0.8.2/src/gp_rpc_wrap_size_limit.c
Examining data/gssproxy-0.8.2/src/gp_selinux.h
Examining data/gssproxy-0.8.2/src/gp_socket.c
Examining data/gssproxy-0.8.2/src/gp_util.c
Examining data/gssproxy-0.8.2/src/gp_workers.c
Examining data/gssproxy-0.8.2/src/gssproxy.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_accept_sec_context.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_acquire_cred.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_context.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_creds.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_display_status.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_import_and_canon_name.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_indicate_mechs.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_init_sec_context.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_misc.c
Examining data/gssproxy-0.8.2/src/mechglue/gpp_priv_integ.c
Examining data/gssproxy-0.8.2/src/mechglue/gss_plugin.c
Examining data/gssproxy-0.8.2/src/mechglue/gss_plugin.h
Examining data/gssproxy-0.8.2/tests/cli_srv_comm.c
Examining data/gssproxy-0.8.2/tests/interposetest.c
Examining data/gssproxy-0.8.2/tests/t_accept.c
Examining data/gssproxy-0.8.2/tests/t_acquire.c
Examining data/gssproxy-0.8.2/tests/t_cred_store.c
Examining data/gssproxy-0.8.2/tests/t_impersonate.c
Examining data/gssproxy-0.8.2/tests/t_init.c
Examining data/gssproxy-0.8.2/tests/t_setcredopt.c
Examining data/gssproxy-0.8.2/tests/t_utils.c
Examining data/gssproxy-0.8.2/tests/t_utils.h

FINAL RESULTS:

data/gssproxy-0.8.2/src/gp_debug.c:79: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(stderr, format, varargs);
data/gssproxy-0.8.2/src/gp_debug.c:90: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(stderr, format, varargs);
data/gssproxy-0.8.2/src/gp_log.c:22:11:  [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(buf, max, fmt, ap);
data/gssproxy-0.8.2/src/gp_log.h:10:22:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
#define GPERROR(...) syslog(LOG_ERR, __VA_ARGS__);
data/gssproxy-0.8.2/src/gp_log.h:11:22:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
#define GPAUDIT(...) syslog(LOG_INFO, __VA_ARGS__);
data/gssproxy-0.8.2/src/mechglue/gss_plugin.h:42:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stderr, __VA_ARGS__); \
data/gssproxy-0.8.2/tests/t_utils.h:19: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(msg, 4096, __VA_ARGS__); \
data/gssproxy-0.8.2/src/gp_debug.c:17: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.
    if (level >= 3 && !getenv("KRB5_TRACE"))
data/gssproxy-0.8.2/src/gp_socket.c:298:15:  [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.
    program = realpath(procfile, NULL);
data/gssproxy-0.8.2/src/gp_util.c:45: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.
        return getenv(name);
data/gssproxy-0.8.2/tests/interposetest.c:109: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.
    if (getenv(GSSPROXY_BEHAVIOR_ENV)) {
data/gssproxy-0.8.2/tests/interposetest.c:152:39:  [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.
    DEBUG("%s behavior: %s\n", actor, getenv(GSSPROXY_BEHAVIOR_ENV));
data/gssproxy-0.8.2/tests/interposetest.c:409:39:  [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.
    DEBUG("%s behavior: %s\n", actor, getenv(GSSPROXY_BEHAVIOR_ENV));
data/gssproxy-0.8.2/rpcgen/gp_rpc.h:91: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 results[0];
data/gssproxy-0.8.2/rpcgen/gss_proxy.h:168: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).
	bool_t open;
data/gssproxy-0.8.2/rpcgen/gss_proxy_xdr.c:258:31:  [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 (!xdr_bool (xdrs, &objp->open))
data/gssproxy-0.8.2/src/client/gpm_common.c: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 name[PATH_MAX];
data/gssproxy-0.8.2/src/client/gpm_indicate_mechs.c:91: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(newbuf->value, oldbuf->value, oldbuf->length);
data/gssproxy-0.8.2/src/client/gpm_inquire_context.c:13:36:  [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 *open)
data/gssproxy-0.8.2/src/client/gpm_inquire_context.c:79: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).
    if (open) {
data/gssproxy-0.8.2/src/client/gpm_inquire_context.c:80:29:  [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 (context_handle->open) {
data/gssproxy-0.8.2/src/client/gssapi_gpm.h:172:36:  [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 *open);
data/gssproxy-0.8.2/src/gp_conv.c:20: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, in, len);
data/gssproxy-0.8.2/src/gp_conv.c:179: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(str, in->octet_string_val, in->octet_string_len);
data/gssproxy-0.8.2/src/gp_creds.c:109: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[PWBUFLEN];
data/gssproxy-0.8.2/src/gp_creds.c:337:26:  [2] (integer) atol:
  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).
            target_uid = atol(desired_name->display_name.octet_string_val);
data/gssproxy-0.8.2/src/gp_creds.c:1128: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 value[GPKRB_MAX_CRED_SIZE];
data/gssproxy-0.8.2/src/gp_debug.c:26: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[MAX_LOG_LINE];
data/gssproxy-0.8.2/src/gp_debug.c:35:21:  [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 __thread char buffer[24];
data/gssproxy-0.8.2/src/gp_debug.c:59:21:  [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 __thread char buffer[18];
data/gssproxy-0.8.2/src/gp_export.c:46: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 ktname[MAX_KEYTAB_NAME_LEN + 1] = {0};
data/gssproxy-0.8.2/src/gp_export.c:279: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(padded, buf, len);
data/gssproxy-0.8.2/src/gp_export.c:689: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(p, &flags, sizeof(flags));
data/gssproxy-0.8.2/src/gp_export.c:691: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(p, &lucid->endtime, sizeof(lucid->endtime));
data/gssproxy-0.8.2/src/gp_export.c:693: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(p, &lucid->send_seq, sizeof(lucid->send_seq));
data/gssproxy-0.8.2/src/gp_export.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(p, &enctype, sizeof(enctype));
data/gssproxy-0.8.2/src/gp_export.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(p, keydata, keysize);
data/gssproxy-0.8.2/src/gp_init.c:37: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 buf[1];
data/gssproxy-0.8.2/src/gp_init.c:173: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(LINUX_PROC_USE_GSS_PROXY_FILE, O_RDWR);
data/gssproxy-0.8.2/src/gp_init.c:205:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(GP_PID_FILE, "w");
data/gssproxy-0.8.2/src/gp_init.c:228: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[2048];
data/gssproxy-0.8.2/src/gp_log.c:56: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[MAX_LOG_LINE];
data/gssproxy-0.8.2/src/gp_rpc_debug.c:232:36:  [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).
    gp_debug_printf("%d ", (int)x->open);
data/gssproxy-0.8.2/src/gp_rpc_process.c:336: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(buffer, reply_buffer, length);
data/gssproxy-0.8.2/src/gp_rpc_process.c:360: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 reply_buffer[MAX_RPC_SIZE];
data/gssproxy-0.8.2/src/gp_socket.c:285: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 procfile[21];
data/gssproxy-0.8.2/src/gp_util.c:63:21:  [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 __thread char buf[MAX_GP_STRERROR];
data/gssproxy-0.8.2/src/gp_util.c:159: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(opt.option.octet_string_val, option, option_len);
data/gssproxy-0.8.2/src/gp_util.c:168: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(opt.value.octet_string_val, value, value_len);
data/gssproxy-0.8.2/src/mechglue/gpp_context.c:162:36:  [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 *open)
data/gssproxy-0.8.2/src/mechglue/gpp_context.c:208:35:  [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).
                                  open);
data/gssproxy-0.8.2/src/mechglue/gpp_context.c:218:35:  [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).
                                  open);
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:148: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(cred_name, creds->desired_name.display_name.octet_string_val,
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:190: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 cred_name[creds->desired_name.display_name.octet_string_len + 1];
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:304: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 client_name[name->display_name.octet_string_len + 1];
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:305: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(client_name, name->display_name.octet_string_val,
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:885: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(wrap_token.value, &len, sizeof(uint32_t));
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:886: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(wrap_token.value + sizeof(uint32_t),
data/gssproxy-0.8.2/src/mechglue/gpp_creds.c:888: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(wrap_token.value + sizeof(uint32_t) + spmech->length,
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:243: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(item->regular_oid.elements, n->elements, n->length);
data/gssproxy-0.8.2/src/mechglue/gss_plugin.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(item->special_oid.elements, base->elements, base->length);
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:245: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(item->special_oid.elements + base->length, n->elements, n->length);
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:426: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(wrap_token->value, &len, sizeof(uint32_t));
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:427: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(wrap_token->value + sizeof(uint32_t),
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:429: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(wrap_token->value + sizeof(uint32_t) + spmech->length,
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:454: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(&len, token.value, sizeof(uint32_t));
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:465: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(mech.elements, token.value + sizeof(uint32_t), mech.length);
data/gssproxy-0.8.2/src/mechglue/gss_plugin.c:565: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(c->elements, in->elements, in->length);
data/gssproxy-0.8.2/src/mechglue/gss_plugin.h:234:37:  [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 *open);
data/gssproxy-0.8.2/tests/cli_srv_comm.c:31: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/cli_srv_comm.c:119: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/cli_srv_comm.c:192: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(buffer, CLI_MSG, sizeof(CLI_MSG));
data/gssproxy-0.8.2/tests/cli_srv_comm.c:271: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/interposetest.c:44:52:  [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).
                              &locally_initiated, &open);
data/gssproxy-0.8.2/tests/interposetest.c:62:69:  [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)lifetime_rec, (int)ctx_flags, locally_initiated, open);
data/gssproxy-0.8.2/tests/interposetest.c:132: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/interposetest.c:371: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/t_accept.c:7: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/t_init.c:7: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[MAX_RPC_SIZE];
data/gssproxy-0.8.2/tests/t_utils.h: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 msg[4096]; \
data/gssproxy-0.8.2/src/client/gpm_common.c:94:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(addr.sun_path, name, sizeof(addr.sun_path)-1);
data/gssproxy-0.8.2/src/client/gpm_common.c:313:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = read(gpmctx->timerfd, &timer_read, sizeof(uint64_t));
data/gssproxy-0.8.2/src/client/gpm_common.c:459:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rn = read(gpmctx->fd, &size, sizeof(uint32_t));
data/gssproxy-0.8.2/src/client/gpm_common.c:490:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rn = read(gpmctx->fd, *buffer + pos, *length - pos);
data/gssproxy-0.8.2/src/client/gpm_display_status.c:59:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    status.minor_status_string.utf8string_len = strlen(err_str) + 1;
data/gssproxy-0.8.2/src/gp_conv.c:326: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).
    ret_str->utf8string_len = strlen(str) + 1;
data/gssproxy-0.8.2/src/gp_creds.c:131: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(str);
data/gssproxy-0.8.2/src/gp_creds.c:377:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            namebuf.length = strlen(str);
data/gssproxy-0.8.2/src/gp_creds.c:394: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).
        const_buf.length = strlen(svc->krb5.principal) + 1;
data/gssproxy-0.8.2/src/gp_creds.c:527:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        int equal;
data/gssproxy-0.8.2/src/gp_creds.c:532:69:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        ret_maj = gss_compare_name(&ret_min, req_name, check_name, &equal);
data/gssproxy-0.8.2/src/gp_creds.c:536:14:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if (!equal) {
data/gssproxy-0.8.2/src/gp_creds.c:924: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).
            (strlen(impersonator) == buf.length);
data/gssproxy-0.8.2/src/gp_export.c:56:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ktname, keytab, MAX_KEYTAB_NAME_LEN);
data/gssproxy-0.8.2/src/gp_export.c:64:13:  [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(ktname, "[default]", MAX_KEYTAB_NAME_LEN);
data/gssproxy-0.8.2/src/gp_init.c:80:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(0177);
data/gssproxy-0.8.2/src/gp_socket.c:189:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    old_mode = umask(0111);
data/gssproxy-0.8.2/src/gp_socket.c:192:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(addr.sun_path, file_name, sizeof(addr.sun_path)-1);
data/gssproxy-0.8.2/src/gp_socket.c:243:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(old_mode);
data/gssproxy-0.8.2/src/gp_socket.c:370:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rn = read(fd, &size, sizeof(uint32_t));
data/gssproxy-0.8.2/src/gp_socket.c:415:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rn = read(fd, rbuf->data + rbuf->pos, rbuf->size - rbuf->pos);
data/gssproxy-0.8.2/src/gp_util.c:85:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, gp_internal_err, MAX_GP_STRERROR);
data/gssproxy-0.8.2/src/gp_util.c:95:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, gp_internal_err, MAX_GP_STRERROR);
data/gssproxy-0.8.2/src/gp_util.c:99:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, ret, MAX_GP_STRERROR);
data/gssproxy-0.8.2/src/gp_util.c:115:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(fd, &b[len], count - len);
data/gssproxy-0.8.2/src/gp_workers.c:293:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(w->sig_pipe[0], &dummy, 1);
data/gssproxy-0.8.2/tests/cli_srv_comm.c:136: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).
    target_buf.length = strlen(data->target) + 1;
data/gssproxy-0.8.2/tests/cli_srv_comm.c:222:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    in_token.length = strlen(in_token.value) + 1;
data/gssproxy-0.8.2/tests/cli_srv_comm.c:309: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).
    target_buf.length = strlen(data->target) + 1;
data/gssproxy-0.8.2/tests/interposetest.c:155: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).
    target_buf.length = strlen(data->target) + 1;
data/gssproxy-0.8.2/tests/interposetest.c:237: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).
    msg_buf.length = strlen(message) + 1;
data/gssproxy-0.8.2/tests/interposetest.c:412: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).
    const_buf.length = strlen(data->target) + 1;
data/gssproxy-0.8.2/tests/interposetest.c:597:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    in_token.length = strlen(message);
data/gssproxy-0.8.2/tests/interposetest.c:790: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(100000);
data/gssproxy-0.8.2/tests/t_utils.c:42:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rn = read(fd, &size, sizeof(uint32_t));
data/gssproxy-0.8.2/tests/t_utils.c:55:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rn = read(fd, buf + pos, *len - pos);
data/gssproxy-0.8.2/tests/t_utils.c:103: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).
    target_buf.length = strlen(string) + 1;

ANALYSIS SUMMARY:

Hits = 117
Lines analyzed = 21951 in approximately 0.42 seconds (52083 lines/second)
Physical Source Lines of Code (SLOC) = 18197
Hits@level = [0]  32 [1]  37 [2]  67 [3]   6 [4]   7 [5]   0
Hits@level+ = [0+] 149 [1+] 117 [2+]  80 [3+]  13 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 8.18816 [1+] 6.42963 [2+] 4.39633 [3+] 0.714403 [4+] 0.384679 [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.