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/libgssglue-0.4/src/g_imp_name.c
Examining data/libgssglue-0.4/src/g_rel_oid_set.c
Examining data/libgssglue-0.4/src/gssd_pname_to_uid.c
Examining data/libgssglue-0.4/src/g_compare_name.c
Examining data/libgssglue-0.4/src/gen_oids.c
Examining data/libgssglue-0.4/src/g_dsp_status.c
Examining data/libgssglue-0.4/src/g_process_context.c
Examining data/libgssglue-0.4/src/g_indicate_mechs.c
Examining data/libgssglue-0.4/src/g_seal.c
Examining data/libgssglue-0.4/src/mglueP.h
Examining data/libgssglue-0.4/src/g_oid_ops.c
Examining data/libgssglue-0.4/src/mechglue.h
Examining data/libgssglue-0.4/src/g_lucid_context.c
Examining data/libgssglue-0.4/src/g_accept_sec_context.c
Examining data/libgssglue-0.4/src/g_exp_name.c
Examining data/libgssglue-0.4/src/g_sign.c
Examining data/libgssglue-0.4/src/g_wrap.c
Examining data/libgssglue-0.4/src/g_verify_mic.c
Examining data/libgssglue-0.4/src/g_mechname.c
Examining data/libgssglue-0.4/src/g_init_sec_context.c
Examining data/libgssglue-0.4/src/g_ccache_name.c
Examining data/libgssglue-0.4/src/g_dup_name.c
Examining data/libgssglue-0.4/src/g_inq_names.c
Examining data/libgssglue-0.4/src/g_mit_krb5_mech.c
Examining data/libgssglue-0.4/src/g_set_allowable_enctypes.c
Examining data/libgssglue-0.4/src/g_get_mic.c
Examining data/libgssglue-0.4/src/g_verify.c
Examining data/libgssglue-0.4/src/g_imp_sec_context.c
Examining data/libgssglue-0.4/src/oid_ops.c
Examining data/libgssglue-0.4/src/g_unwrap.c
Examining data/libgssglue-0.4/src/g_inq_cred.c
Examining data/libgssglue-0.4/src/g_rel_buffer.c
Examining data/libgssglue-0.4/src/g_dsp_name.c
Examining data/libgssglue-0.4/src/g_context_time.c
Examining data/libgssglue-0.4/src/g_rel_cred.c
Examining data/libgssglue-0.4/src/g_unseal.c
Examining data/libgssglue-0.4/src/g_inq_context.c
Examining data/libgssglue-0.4/src/g_exp_sec_context.c
Examining data/libgssglue-0.4/src/g_canon_name.c
Examining data/libgssglue-0.4/src/g_delete_sec_context.c
Examining data/libgssglue-0.4/src/g_glue.c
Examining data/libgssglue-0.4/src/g_acquire_cred.c
Examining data/libgssglue-0.4/src/g_rel_name.c
Examining data/libgssglue-0.4/src/g_initialize.c

FINAL RESULTS:

data/libgssglue-0.4/src/oid_ops.c:229:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(bp, numstr);
data/libgssglue-0.4/src/oid_ops.c:231:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(bp, numstr);
data/libgssglue-0.4/src/oid_ops.c:238:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(bp, numstr);
data/libgssglue-0.4/src/g_initialize.c:199:22:  [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.
        ((filename = getenv("GSSAPI_MECH_CONF")) == NULL))
data/libgssglue-0.4/src/g_initialize.c:276:22:  [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.
        ((filename = getenv("GSSAPI_MECH_CONF")) == NULL))
data/libgssglue-0.4/src/g_accept_sec_context.c:112:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(union_ctx_id->mech_type->elements,
data/libgssglue-0.4/src/g_acquire_cred.c:434:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void) memcpy(new_mechs_array, union_cred->mechs_array,
data/libgssglue-0.4/src/g_acquire_cred.c:436:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void) memcpy(new_cred_array, union_cred->cred_array,
data/libgssglue-0.4/src/g_dsp_name.c:87:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(output_name_buffer->value,
data/libgssglue-0.4/src/g_dup_name.c:103: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(union_exp_name->external_name.value,
data/libgssglue-0.4/src/g_exp_sec_context.c:93:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf+4, ctx->mech_type->elements, (size_t) ctx->mech_type->length);
data/libgssglue-0.4/src/g_exp_sec_context.c:94:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf+4+ctx->mech_type->length, token.value, token.length);
data/libgssglue-0.4/src/g_glue.c:324: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(temp->value, src->value, src->length);
data/libgssglue-0.4/src/g_imp_name.c:105: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(union_name->external_name.value, input_name_buffer->value,
data/libgssglue-0.4/src/g_imp_sec_context.c:85:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->mech_type->elements, p, length);
data/libgssglue-0.4/src/g_indicate_mechs.c:96:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(supported_mechs->elements[i].elements,
data/libgssglue-0.4/src/g_indicate_mechs.c:123:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tmp_set->elements[i].elements,
data/libgssglue-0.4/src/g_init_sec_context.c:138:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(union_ctx_id->mech_type->elements, mech_type->elements,
data/libgssglue-0.4/src/g_initialize.c:193: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[BUFSIZ], *filename, *symname, *endp;
data/libgssglue-0.4/src/g_initialize.c:202: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).
    if ((conffile = fopen(filename, "r")) == NULL) {
data/libgssglue-0.4/src/g_initialize.c:270: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[BUFSIZ], *filename, *symname, *endp, *err_string;
data/libgssglue-0.4/src/g_initialize.c:279: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).
    if ((conffile = fopen(filename, "r")) == NULL) {
data/libgssglue-0.4/src/g_inq_context.c:45:6:  [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/libgssglue-0.4/src/g_inq_context.c:55:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int *		open;
data/libgssglue-0.4/src/g_inq_context.c:92:4:  [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/libgssglue-0.4/src/g_mit_krb5_mech.c:146:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fullname[256];
data/libgssglue-0.4/src/mglueP.h:22: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((o1)->elements, (o2)->elements, (o2)->length);   \
data/libgssglue-0.4/src/oid_ops.c:120:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy((*oid_set)->elements,
data/libgssglue-0.4/src/oid_ops.c:129:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(lastel->elements, member_oid->elements,
data/libgssglue-0.4/src/oid_ops.c:184:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		numstr[128];
data/libgssglue-0.4/src/oid_ops.c:200:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(numstr, "%ld ", number/40);
data/libgssglue-0.4/src/oid_ops.c:202:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(numstr, "%ld ", number%40);
data/libgssglue-0.4/src/oid_ops.c:214:6:  [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(numstr, "%ld ", number);
data/libgssglue-0.4/src/oid_ops.c:226:2:  [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(bp, "{ ");
data/libgssglue-0.4/src/oid_ops.c:228:2:  [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(numstr, "%ld ", number/40);
data/libgssglue-0.4/src/oid_ops.c:230:2:  [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(numstr, "%ld ", number%40);
data/libgssglue-0.4/src/oid_ops.c:237: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(numstr, "%ld ", number);
data/libgssglue-0.4/src/oid_ops.c:441:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        (void) memcpy(out->elements, in->elements, in->length);
data/libgssglue-0.4/src/oid_ops.c:201: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).
    string_length += strlen(numstr);
data/libgssglue-0.4/src/oid_ops.c:203: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).
    string_length += strlen(numstr);
data/libgssglue-0.4/src/oid_ops.c:215: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).
	    string_length += strlen(numstr);
data/libgssglue-0.4/src/oid_ops.c:242:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(bp, "}");
data/libgssglue-0.4/src/oid_ops.c:243:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	oid_str->length = strlen(bp)+1;

ANALYSIS SUMMARY:

Hits = 43
Lines analyzed = 6247 in approximately 0.31 seconds (20289 lines/second)
Physical Source Lines of Code (SLOC) = 3672
Hits@level = [0]  14 [1]   5 [2]  33 [3]   2 [4]   3 [5]   0
Hits@level+ = [0+]  57 [1+]  43 [2+]  38 [3+]   5 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 15.5229 [1+] 11.7102 [2+] 10.3486 [3+] 1.36166 [4+] 0.816993 [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.