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/slapi-nis-0.56.5/src/disp-nis.c Examining data/slapi-nis-0.56.5/src/disp-nis.h Examining data/slapi-nis-0.56.5/src/dummymap.c Examining data/slapi-nis-0.56.5/src/map.h Examining data/slapi-nis-0.56.5/src/nis.c Examining data/slapi-nis-0.56.5/src/nis.h Examining data/slapi-nis-0.56.5/src/plug-nis.c Examining data/slapi-nis-0.56.5/src/plugin.h Examining data/slapi-nis-0.56.5/src/portmap.c Examining data/slapi-nis-0.56.5/src/portmap.h Examining data/slapi-nis-0.56.5/src/back-nis.c Examining data/slapi-nis-0.56.5/src/backend.h Examining data/slapi-nis-0.56.5/src/back-shr.c Examining data/slapi-nis-0.56.5/src/back-shr.h Examining data/slapi-nis-0.56.5/src/defs-nis.c Examining data/slapi-nis-0.56.5/src/defs-nis.h Examining data/slapi-nis-0.56.5/src/format.c Examining data/slapi-nis-0.56.5/src/format.h Examining data/slapi-nis-0.56.5/src/map.c Examining data/slapi-nis-0.56.5/src/wrap.c Examining data/slapi-nis-0.56.5/src/wrap.h Examining data/slapi-nis-0.56.5/src/back-sch.c Examining data/slapi-nis-0.56.5/src/back-sch.h Examining data/slapi-nis-0.56.5/src/plug-sch.c Examining data/slapi-nis-0.56.5/src/back-sch-nss.c Examining data/slapi-nis-0.56.5/src/back-sch-nss.h Examining data/slapi-nis-0.56.5/src/back-sch-sss_idmap.c Examining data/slapi-nis-0.56.5/src/back-sch-nss_sss.c Examining data/slapi-nis-0.56.5/src/back-sch-pam.c Examining data/slapi-nis-0.56.5/src/back-sch-idview.c Examining data/slapi-nis-0.56.5/tests/wrap-nsswitch.c Examining data/slapi-nis-0.56.5/tests/wrap-pam.c Examining data/slapi-nis-0.56.5/tests/clients/ldifsort.c Examining data/slapi-nis-0.56.5/tests/clients/yp.c Examining data/slapi-nis-0.56.5/tests/clients/yp.h Examining data/slapi-nis-0.56.5/tests/clients/yp_clnt.c Examining data/slapi-nis-0.56.5/tests/clients/yp_xdr.c FINAL RESULTS: data/slapi-nis-0.56.5/src/back-nis.c:495:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ret + j, domain); data/slapi-nis-0.56.5/src/back-nis.c:500:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ret + j, map); data/slapi-nis-0.56.5/src/back-nis.c:943:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter, "(&(" data/slapi-nis-0.56.5/src/back-shr.c:153:6: [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(data->rel_attr_list + length, data->rel_attrs[i]); data/slapi-nis-0.56.5/src/back-shr.c:202:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, strlist[i]); data/slapi-nis-0.56.5/src/back-shr.c:260:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, (*strlist)[i]); data/slapi-nis-0.56.5/src/back-shr.c:264:3: [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(p, value); data/slapi-nis-0.56.5/src/back-shr.c:598:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "(%s)", ret); data/slapi-nis-0.56.5/src/back-shr.c:1090:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter, "(&%s(|", basic_filter); data/slapi-nis-0.56.5/src/back-shr.c:1096:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter, "(&%s", basic_filter); data/slapi-nis-0.56.5/src/back-shr.c:1102:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter + strlen(filter), data/slapi-nis-0.56.5/src/back-shr.c:1171:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ret + length, mods[i]->mod_type); data/slapi-nis-0.56.5/src/format.c:958:4: [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(out, argv[i]); data/slapi-nis-0.56.5/src/format.c:1742:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter, "(&(%s=%s)%s)", other_attr, tndn, use_filter); data/slapi-nis-0.56.5/src/format.c:1996:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter, "(%s=%s)", data/slapi-nis-0.56.5/src/format.c:2037:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filter, "(%s=%s)", data/slapi-nis-0.56.5/src/portmap.c:73:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, va); data/slapi-nis-0.56.5/src/portmap.c:125:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system("rpcinfo | grep ypserv"); data/slapi-nis-0.56.5/src/portmap.c:126:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system("rpcinfo -p | grep ypserv"); data/slapi-nis-0.56.5/src/portmap.c:617:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(sockun.sun_path, _PATH_RPCBINDSOCK); data/slapi-nis-0.56.5/tests/clients/ldifsort.c:82:7: [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(p, entry.entry); data/slapi-nis-0.56.5/tests/clients/ldifsort.c:83:7: [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(p, buf); data/slapi-nis-0.56.5/tests/clients/ldifsort.c:85:7: [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(p, buf); data/slapi-nis-0.56.5/tests/clients/yp.c:115:3: [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(output, *ret ? "TRUE\n" : "FALSE\n"); data/slapi-nis-0.56.5/tests/clients/yp.c:375:11: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. output = popen("env LANG=C sort", "w"); data/slapi-nis-0.56.5/src/back-nis.c:647:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv(NIS_PLUGIN_PROCESS_UNINTERESTING_UPDATES_ENV) == NULL) || data/slapi-nis-0.56.5/src/back-nis.c:648:12: [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. (atol(getenv(NIS_PLUGIN_PROCESS_UNINTERESTING_UPDATES_ENV)) == 0)) { data/slapi-nis-0.56.5/src/back-sch.c:227:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv(SCHEMA_COMPAT_PLUGIN_PROCESS_UNINTERESTING_UPDATES_ENV) == NULL) || data/slapi-nis-0.56.5/src/back-sch.c:228:12: [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. (atol(getenv(SCHEMA_COMPAT_PLUGIN_PROCESS_UNINTERESTING_UPDATES_ENV)) == 0)) { data/slapi-nis-0.56.5/src/defs-nis.c:337:14: [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 ((c = getopt(argc, argv, "d:s:m:")) != -1) { data/slapi-nis-0.56.5/src/plug-nis.c:315:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv(NIS_PLUGIN_CONTINUE_WITHOUT_PORTMAP_ENV) == NULL) || data/slapi-nis-0.56.5/src/plug-nis.c:316: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. !atol(getenv(NIS_PLUGIN_CONTINUE_WITHOUT_PORTMAP_ENV))) { data/slapi-nis-0.56.5/tests/clients/yp.c:341:14: [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 ((c = getopt(argc, argv, "6ch:p:t:")) != -1) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:48:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv("WRAPPERS_PASSWD") != NULL) && data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:49:19: [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. ((fp = fopen(getenv("WRAPPERS_PASSWD"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:119:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv("WRAPPERS_PASSWD") != NULL) && data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:120:19: [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. ((fp = fopen(getenv("WRAPPERS_PASSWD"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:190:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv("WRAPPERS_GROUP") != NULL) && data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:191:19: [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. ((fp = fopen(getenv("WRAPPERS_GROUP"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:261:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv("WRAPPERS_GROUP") != NULL) && data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:262:19: [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. ((fp = fopen(getenv("WRAPPERS_GROUP"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:331:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv("WRAPPERS_GROUP") != NULL) && data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:332:19: [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. ((fp = fopen(getenv("WRAPPERS_GROUP"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-pam.c:114:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("WRAPPERS_PAM_CREDS") == NULL) { data/slapi-nis-0.56.5/tests/wrap-pam.c:124: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. fp = fopen(getenv("WRAPPERS_PAM_CREDS"), "r"); data/slapi-nis-0.56.5/src/back-nis.c:648:7: [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). (atol(getenv(NIS_PLUGIN_PROCESS_UNINTERESTING_UPDATES_ENV)) == 0)) { data/slapi-nis-0.56.5/src/back-sch-nss.c:130: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(memberUid, bval->bv_val, bval->bv_len); data/slapi-nis-0.56.5/src/back-sch-nss.c:167: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(config->name, bval->bv_val, data/slapi-nis-0.56.5/src/back-sch-nss_sss.c:261: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(groups, newgroups, data/slapi-nis-0.56.5/src/back-sch-pam.c:113: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(reply[ii].resp, creds->bv_val, creds->bv_len); data/slapi-nis-0.56.5/src/back-sch.c:228:7: [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). (atol(getenv(SCHEMA_COMPAT_PLUGIN_PROCESS_UNINTERESTING_UPDATES_ENV)) == 0)) { data/slapi-nis-0.56.5/src/back-sch.c:370: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 *attr, *attrs[2], *actual_attr, *val; data/slapi-nis-0.56.5/src/back-sch.c:436: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 timestamp_str[4 + 2 + 2 + 2 + 2 + 2 + 2]; /* YYYYMMDDHHMMSSZ\0 */ data/slapi-nis-0.56.5/src/back-sch.c:582: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 *rdn, *ndn, *ldif, *plugin_id, *keys[2], *values[2], **ava, *p, *q; data/slapi-nis-0.56.5/src/back-sch.c:629: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(q, rdn, i); data/slapi-nis-0.56.5/src/back-shr.c:307:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, *sdnlist, (i + 1) * sizeof(ret[0])); data/slapi-nis-0.56.5/src/back-shr.c:1092:4: [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(filter, "(|"); data/slapi-nis-0.56.5/src/back-shr.c:1108:4: [2] (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 string. strcat(filter, "))"); data/slapi-nis-0.56.5/src/back-shr.c:1160: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(ret + length, "add:"); data/slapi-nis-0.56.5/src/back-shr.c:1164: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(ret + length, "replace:"); data/slapi-nis-0.56.5/src/back-shr.c:1168: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(ret + length, "delete:"); data/slapi-nis-0.56.5/src/back-shr.c:1206: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 *these_attrs[2], *prev_attrs[2], *next_attrs[2]; data/slapi-nis-0.56.5/src/back-shr.c:2929: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 *ignored_containers[4] = { "cn=config", "cn=schema", "cn=changelog", NULL}; data/slapi-nis-0.56.5/src/disp-nis.c:84: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 client_inbuf[8192 + 4]; data/slapi-nis-0.56.5/src/disp-nis.c:402: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(cdata->connected->client_outbuf + data/slapi-nis-0.56.5/src/disp-nis.c:405: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(cdata->connected->client_outbuf + data/slapi-nis-0.56.5/src/disp-nis.c:435: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 dgram[65536]; data/slapi-nis-0.56.5/src/disp-nis.c:728: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(&nlen, client->client_inbuf, 4); data/slapi-nis-0.56.5/src/disp-nis.c:761: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(query, data/slapi-nis-0.56.5/src/disp-nis.c:765:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(query + client->client_query_size, data/slapi-nis-0.56.5/src/format.c:82: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(ret, start, length); data/slapi-nis-0.56.5/src/format.c:101:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, region, size); data/slapi-nis-0.56.5/src/format.c:264: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(ret, *list, len * sizeof(sdn)); data/slapi-nis-0.56.5/src/format.c:272:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret2, *list2, point * sizeof(sdn)); data/slapi-nis-0.56.5/src/format.c:278:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret2 + point + 1, data/slapi-nis-0.56.5/src/format.c:527: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(ret, *list, i * sizeof(struct format_ref_attr_list*)); data/slapi-nis-0.56.5/src/format.c:664:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, *attrs, elements * sizeof(**attrs)); data/slapi-nis-0.56.5/src/format.c:761:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(list, *bvlist, i * sizeof(struct berval *)); data/slapi-nis-0.56.5/src/format.c:1050:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outbuf, values[first], lengths[first]); data/slapi-nis-0.56.5/src/format.c:1082: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 *attrs[2], *actual_attr, *actual_ref_attr; data/slapi-nis-0.56.5/src/format.c:1301: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 *attrs[2], *actual_attr; data/slapi-nis-0.56.5/src/format.c:1660: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 **argv, *attrs[2], *filter, *tndn, *attr, *other_attr; data/slapi-nis-0.56.5/src/format.c:1872: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 **argv, *attrs[2], *filter, *tndn, *attr; data/slapi-nis-0.56.5/src/format.c:2163: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(outbuf + ret, sep, slen); data/slapi-nis-0.56.5/src/format.c:2166:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outbuf + ret, values[j], lengths[j]); data/slapi-nis-0.56.5/src/format.c:2267:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outbuf, matches[0], len); data/slapi-nis-0.56.5/src/format.c:2319:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outbuf, default_value, default_length); data/slapi-nis-0.56.5/src/format.c:2633: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(ret + j, data/slapi-nis-0.56.5/src/format.c:3334: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, values[i][result_n], l); data/slapi-nis-0.56.5/src/format.c:3340: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, values[i + 1][result_n % data/slapi-nis-0.56.5/src/format.c:3347: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, argv[(i / 2) * 3 + 2], l); data/slapi-nis-0.56.5/src/format.c:3529: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, "%d", ++sequence); data/slapi-nis-0.56.5/src/format.c:3588:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max = atoi(argv[0]); data/slapi-nis-0.56.5/src/format.c:3669: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 + buf_used, sep, slen); data/slapi-nis-0.56.5/src/format.c:3672:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_used, values[j], lengths[j]); data/slapi-nis-0.56.5/src/format.c:3948: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, input.bv_val, i); data/slapi-nis-0.56.5/src/format.c:3951: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(buf, input.bv_val + i, data/slapi-nis-0.56.5/src/format.c:3973: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, data/slapi-nis-0.56.5/src/format.c:3978: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(buf, input.bv_val, data/slapi-nis-0.56.5/src/format.c:4000: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, input.bv_val, (input.bv_len - i)); data/slapi-nis-0.56.5/src/format.c:4003: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(buf, input.bv_val + i, data/slapi-nis-0.56.5/src/format.c:4025: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, input.bv_val + i, input.bv_len - i); data/slapi-nis-0.56.5/src/format.c:4028: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(buf, input.bv_val, data/slapi-nis-0.56.5/src/format.c:4252: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(outbuf, tmp.bv_val, tmp.bv_len); data/slapi-nis-0.56.5/src/format.c:4749: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(ret[j] + k, template + offset, length); data/slapi-nis-0.56.5/src/format.c:4755: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(ret[j] + k, val->bv_val, val->bv_len); data/slapi-nis-0.56.5/src/format.c:4761:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret[j] + k, template + offset, length); data/slapi-nis-0.56.5/src/map.c:108: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(ret, region, size); data/slapi-nis-0.56.5/src/map.c:397: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 *tmp, hostname[HOST_NAME_MAX + 1]; data/slapi-nis-0.56.5/src/map.c:876: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(domains, map_data.domains, data/slapi-nis-0.56.5/src/map.c:917: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(maps, domain->maps, data/slapi-nis-0.56.5/src/map.c:1059:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(key_trees, map->key_trees, data/slapi-nis-0.56.5/src/nis.c:539: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 id[1]; data/slapi-nis-0.56.5/src/nis.c:571: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(&cookie->id, id, cookie->id_length); data/slapi-nis-0.56.5/src/nis.c:968: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 auth_buf[MAX_AUTH_BYTES]; data/slapi-nis-0.56.5/src/plug-nis.c:263:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *port = atoi(argv[i]); data/slapi-nis-0.56.5/src/plug-nis.c:316:8: [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). !atol(getenv(NIS_PLUGIN_CONTINUE_WITHOUT_PORTMAP_ENV))) { data/slapi-nis-0.56.5/src/plug-nis.c:400:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char port_desc[16]; data/slapi-nis-0.56.5/src/plug-nis.c:402: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(port_desc, "port %d", port); data/slapi-nis-0.56.5/src/plug-nis.c:404: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(port_desc, "privileged port"); data/slapi-nis-0.56.5/src/portmap.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 portmap_buf[4000], auth_buf[4000], reply_buf[8000], *log_id; data/slapi-nis-0.56.5/src/portmap.c:438: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 address_buf[64]; data/slapi-nis-0.56.5/tests/clients/ldifsort.c:48:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX], *p; data/slapi-nis-0.56.5/tests/clients/ldifsort.c:54:24: [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). infile = (argc > 1) ? fopen(argv[1], "r") : stdin; data/slapi-nis-0.56.5/tests/clients/yp.c:360:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). port = atoi(optarg); data/slapi-nis-0.56.5/tests/clients/yp.c:363: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). timeout = atoi(optarg); data/slapi-nis-0.56.5/tests/clients/yp.h:185: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 ypbind_binding_addr[4]; data/slapi-nis-0.56.5/tests/clients/yp.h:186: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 ypbind_binding_port[2]; data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:49:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ((fp = fopen(getenv("WRAPPERS_PASSWD"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:120:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ((fp = fopen(getenv("WRAPPERS_PASSWD"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:191:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ((fp = fopen(getenv("WRAPPERS_GROUP"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:262:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ((fp = fopen(getenv("WRAPPERS_GROUP"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-nsswitch.c:332:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ((fp = fopen(getenv("WRAPPERS_GROUP"), "r")) != NULL)) { data/slapi-nis-0.56.5/tests/wrap-pam.c:73: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 *authtok, errbuf[LINE_MAX]; data/slapi-nis-0.56.5/tests/wrap-pam.c:111:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX], *p, *q; data/slapi-nis-0.56.5/tests/wrap-pam.c:124:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(getenv("WRAPPERS_PAM_CREDS"), "r"); data/slapi-nis-0.56.5/src/back-nis.c:471:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l += strlen(domain); data/slapi-nis-0.56.5/src/back-nis.c:475:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l += strlen(map); data/slapi-nis-0.56.5/src/back-nis.c:497:10: [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). j += strlen(domain); data/slapi-nis-0.56.5/src/back-nis.c:502:10: [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). j += strlen(map); data/slapi-nis-0.56.5/src/back-nis.c:930:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filter = malloc(strlen("(&(" data/slapi-nis-0.56.5/src/back-nis.c:934:4: [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(domain) + strlen(map) + data/slapi-nis-0.56.5/src/back-nis.c:934:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(domain) + strlen(map) + data/slapi-nis-0.56.5/src/back-nis.c:935:4: [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(NIS_MAP_CONFIGURATION_FILTER) + 1); data/slapi-nis-0.56.5/src/back-sch-nss.c:61:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/slapi-nis-0.56.5/src/back-sch-nss.c:76:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/slapi-nis-0.56.5/src/back-sch-nss.c:84: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). return bval->bv_len - strlen(s); data/slapi-nis-0.56.5/src/back-sch-nss.c:135: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). bval_lw.bv_len = strlen((const char *) lwMemberUid); data/slapi-nis-0.56.5/src/back-sch-nss.c:250:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(pwd->pw_gecos) > 0) { data/slapi-nis-0.56.5/src/back-sch-nss.c:264:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((pwd->pw_shell != NULL) && (strlen(pwd->pw_shell) > 0)) { data/slapi-nis-0.56.5/src/back-sch-pam.c:252:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((username == NULL) || (strlen(username) == 0)) { data/slapi-nis-0.56.5/src/back-sch.c:233:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((ret.common.set != NULL) && (strlen(ret.common.set) > 0)) { data/slapi-nis-0.56.5/src/back-sch.c:311: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(container) > 0) { data/slapi-nis-0.56.5/src/back-sch.c:449:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((usn != NULL) && (strlen(usn) > 0)) { data/slapi-nis-0.56.5/src/back-sch.c:614:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((rdn == NULL) || (strlen(rdn) == 0) || (strchr(rdn, '=') == NULL)) { data/slapi-nis-0.56.5/src/back-sch.c:626:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). q = malloc(strlen(rdn) * 3 + 1); data/slapi-nis-0.56.5/src/back-sch.c:798: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). rdn_len[0] = strlen(rdnstr); data/slapi-nis-0.56.5/src/back-sch.c:984:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(container) > 0) { data/slapi-nis-0.56.5/src/back-sch.c:1253: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(set_data->common.set) != 0) && data/slapi-nis-0.56.5/src/back-sch.c:1554:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = strncmp(e_modifyTimestamp, entry_modifyTimestamp, strlen(e_modifyTimestamp)); data/slapi-nis-0.56.5/src/back-sch.c:1985:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(rdnstr), rdnstr, data/slapi-nis-0.56.5/src/back-sch.c:2036: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). bval.bv_len = strlen(val) + 1; data/slapi-nis-0.56.5/src/back-sch.c:2904:10: [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). set, strlen(set) ? ", " : "", group); data/slapi-nis-0.56.5/src/back-shr.c:143: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). length += (strlen(data->rel_attrs[i]) + 1); data/slapi-nis-0.56.5/src/back-shr.c:151:7: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(data->rel_attr_list + length++, ","); data/slapi-nis-0.56.5/src/back-shr.c:154: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). length += strlen(data->rel_attrs[i]); data/slapi-nis-0.56.5/src/back-shr.c:188:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l += (strlen(strlist[i]) + 1); data/slapi-nis-0.56.5/src/back-shr.c:203:10: [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). s += (strlen(strlist[i]) + 1); data/slapi-nis-0.56.5/src/back-shr.c:226:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(strlist[i]) > 0); data/slapi-nis-0.56.5/src/back-shr.c:242: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). length = strlen(value) + 1; data/slapi-nis-0.56.5/src/back-shr.c:249: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). length += (strlen((*strlist)[i]) + 1); data/slapi-nis-0.56.5/src/back-shr.c:261:10: [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). p += (strlen((*strlist)[i]) + 1); data/slapi-nis-0.56.5/src/back-shr.c:265: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). p += (strlen(value) + 1); data/slapi-nis-0.56.5/src/back-shr.c:594: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(ret) > 0) { data/slapi-nis-0.56.5/src/back-shr.c:595:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((ret[0] != '(') || (ret[strlen(ret) - 1] != ')')) { data/slapi-nis-0.56.5/src/back-shr.c:596:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp = malloc(strlen(ret) + 3); data/slapi-nis-0.56.5/src/back-shr.c:1065: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). filter_size = strlen("(&(|))") + strlen(basic_filter) + 1; data/slapi-nis-0.56.5/src/back-shr.c:1065:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filter_size = strlen("(&(|))") + strlen(basic_filter) + 1; data/slapi-nis-0.56.5/src/back-shr.c:1074: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). filter_size += (strlen("(=)") + data/slapi-nis-0.56.5/src/back-shr.c:1075:5: [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(attrs[i]) + data/slapi-nis-0.56.5/src/back-shr.c:1076:5: [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(tndn)); data/slapi-nis-0.56.5/src/back-shr.c:1089: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(basic_filter) > 0) { data/slapi-nis-0.56.5/src/back-shr.c:1095: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(basic_filter) > 0) { data/slapi-nis-0.56.5/src/back-shr.c:1098:4: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(filter, ""); data/slapi-nis-0.56.5/src/back-shr.c:1102: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). sprintf(filter + strlen(filter), data/slapi-nis-0.56.5/src/back-shr.c:1107: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(basic_filter) > 0) { data/slapi-nis-0.56.5/src/back-shr.c:1110:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(filter, ")"); data/slapi-nis-0.56.5/src/back-shr.c:1113: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(basic_filter) > 0) { data/slapi-nis-0.56.5/src/back-shr.c:1114:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(filter, ")"); data/slapi-nis-0.56.5/src/back-shr.c:1116:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(filter, ""); data/slapi-nis-0.56.5/src/back-shr.c:1149: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). length += (strlen(mods[i]->mod_type) + 1 + 8); data/slapi-nis-0.56.5/src/back-shr.c:1157:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(ret + length++, ","); data/slapi-nis-0.56.5/src/back-shr.c:1172: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). length += strlen(mods[i]->mod_type); data/slapi-nis-0.56.5/src/back-shr.c:2194: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). msv.bv_len = strlen(msv.bv_val); data/slapi-nis-0.56.5/src/back-shr.c:2230: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). msv.bv_len = strlen(msv.bv_val); data/slapi-nis-0.56.5/src/back-shr.c:2293: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). msv.bv_len = strlen(msv.bv_val); data/slapi-nis-0.56.5/src/defs-nis.c:290: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). len = howmany(strlen(s), 3) * 4; data/slapi-nis-0.56.5/src/disp-nis.c:176:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, p, q - p); data/slapi-nis-0.56.5/src/disp-nis.c:205:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, p, q - p); data/slapi-nis-0.56.5/src/disp-nis.c:690:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(client->client_fd, data/slapi-nis-0.56.5/src/dummymap.c:207:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(entries[i].key) == key_len) && data/slapi-nis-0.56.5/src/dummymap.c:217: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). *value_len = strlen(entries[i].value); data/slapi-nis-0.56.5/src/dummymap.c:251:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *key_len = strlen(entries[i].key); data/slapi-nis-0.56.5/src/dummymap.c:253: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). *value_len = strlen(entries[i].value); data/slapi-nis-0.56.5/src/dummymap.c:277: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). *first_key_len = strlen(entries[0].key); data/slapi-nis-0.56.5/src/dummymap.c:279:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *first_value_len = strlen(entries[0].value); data/slapi-nis-0.56.5/src/dummymap.c:298:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(entries[i].key) == prev_len) && data/slapi-nis-0.56.5/src/dummymap.c:311:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *next_key_len = strlen(entries[i + 1].key); data/slapi-nis-0.56.5/src/dummymap.c:313: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). *next_value_len = strlen(entries[i + 1].value); data/slapi-nis-0.56.5/src/dummymap.c:343:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *next_key_len = strlen(entries[i + 1].key); data/slapi-nis-0.56.5/src/dummymap.c:345: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). *next_value_len = strlen(entries[i + 1].value); data/slapi-nis-0.56.5/src/format.c:884:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). val[i]->bv_val = xmemdup(p, strlen(p)); data/slapi-nis-0.56.5/src/format.c:886: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). val[i]->bv_len = strlen(p); data/slapi-nis-0.56.5/src/format.c:919:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). argv = malloc((sizeof(char *) + 1) * (strlen(args) + 1)); data/slapi-nis-0.56.5/src/format.c:923: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). memset(argv, 0, (sizeof(char *) + 1) * (strlen(args) + 1)); data/slapi-nis-0.56.5/src/format.c:925: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). out += sizeof(char *) * (strlen(args) + 1); data/slapi-nis-0.56.5/src/format.c:950: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). out = malloc((argc * 3) + strlen(args)); data/slapi-nis-0.56.5/src/format.c:955:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(out, ","); data/slapi-nis-0.56.5/src/format.c:957:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(out, "'"); data/slapi-nis-0.56.5/src/format.c:959:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(out, "'"); data/slapi-nis-0.56.5/src/format.c:1732:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filter = malloc(strlen(use_filter) + strlen(other_attr) + data/slapi-nis-0.56.5/src/format.c:1732:39: [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). filter = malloc(strlen(use_filter) + strlen(other_attr) + data/slapi-nis-0.56.5/src/format.c:1733:4: [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(tndn) + 7); data/slapi-nis-0.56.5/src/format.c:1990: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). filter = malloc(strlen(list->links[i].attribute) + data/slapi-nis-0.56.5/src/format.c:1991:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(tndn) + 4); data/slapi-nis-0.56.5/src/format.c:2031: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). filter = malloc(strlen(list->links[i].attribute) + data/slapi-nis-0.56.5/src/format.c:2032:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(tndn) + 4); data/slapi-nis-0.56.5/src/format.c:2126: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). slen = strlen(sep); data/slapi-nis-0.56.5/src/format.c:2258:10: [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(matches[0]); data/slapi-nis-0.56.5/src/format.c:3299: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). length += strlen(argv[(i / 2) * 3 + 2]); data/slapi-nis-0.56.5/src/format.c:3346:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(argv[(i / 2) * 3 + 2]); data/slapi-nis-0.56.5/src/format.c:3531: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). bv.bv_len = strlen(buf); data/slapi-nis-0.56.5/src/format.c:3596: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). slen = strlen(sep); data/slapi-nis-0.56.5/src/format.c:4142:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (spn == strlen(expr)) { data/slapi-nis-0.56.5/src/format.c:4839: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). val = malloc(strlen(value) * 3 + 1); data/slapi-nis-0.56.5/src/map.c:712: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). length = strlen(list[i]); data/slapi-nis-0.56.5/src/nis.c:552: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). length = id ? strlen(id) : 0; data/slapi-nis-0.56.5/tests/clients/ldifsort.c:77: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). l = (entry.entry ? strlen(entry.entry) : 0) + data/slapi-nis-0.56.5/tests/clients/ldifsort.c:78:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(buf) + 1; data/slapi-nis-0.56.5/tests/clients/yp.c:94: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). req.key.keydat_len = strlen(argv[2]); data/slapi-nis-0.56.5/tests/clients/yp.c:152:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(* (int *) fd, data, size); data/slapi-nis-0.56.5/tests/wrap-pam.c:84: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). l = strlen(pam_errors[i].name); data/slapi-nis-0.56.5/tests/wrap-pam.c:131:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(buf) > strlen(user)) && data/slapi-nis-0.56.5/tests/wrap-pam.c:131: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). if ((strlen(buf) > strlen(user)) && data/slapi-nis-0.56.5/tests/wrap-pam.c:132: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). (strncmp(user, buf, strlen(user)) == 0) && data/slapi-nis-0.56.5/tests/wrap-pam.c:133:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (buf[strlen(user)] == ':')) { ANALYSIS SUMMARY: Hits = 246 Lines analyzed = 24027 in approximately 0.67 seconds (35646 lines/second) Physical Source Lines of Code (SLOC) = 20306 Hits@level = [0] 59 [1] 110 [2] 91 [3] 20 [4] 25 [5] 0 Hits@level+ = [0+] 305 [1+] 246 [2+] 136 [3+] 45 [4+] 25 [5+] 0 Hits/KSLOC@level+ = [0+] 15.0202 [1+] 12.1146 [2+] 6.69753 [3+] 2.21609 [4+] 1.23116 [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.