openldap-2.6.9-5.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-398): [#def1]
/usr/libexec/openldap/check-config.sh:6:1: warning[SC2112]: 'function' keyword is non-standard. Delete it.
#    4|   . /usr/libexec/openldap/functions
#    5|   
#    6|-> function check_config_syntax()
#    7|   {
#    8|   	retcode=0

Error: SHELLCHECK_WARNING: [#def2]
/usr/libexec/openldap/check-config.sh:10:60: warning[SC3020]: In POSIX sh, &> is undefined.
#    8|   	retcode=0
#    9|   	tmp_slaptest=`mktemp --tmpdir=/var/run/openldap`
#   10|-> 	run_as_ldap "/usr/sbin/slaptest $SLAPD_GLOBAL_OPTIONS -u" &>$tmp_slaptest
#   11|   	if [ $? -ne 0 ]; then
#   12|   		error "Checking configuration file failed:"

Error: SHELLCHECK_WARNING (CWE-398): [#def3]
/usr/libexec/openldap/check-config.sh:20:1: warning[SC2112]: 'function' keyword is non-standard. Delete it.
#   18|   }
#   19|   
#   20|-> function check_certs_perms()
#   21|   {
#   22|   	retcode=0

Error: SHELLCHECK_WARNING (CWE-563): [#def4]
/usr/libexec/openldap/check-config.sh:27:4: warning[SC2034]: retcoder appears unused. Verify use (or export if used externally).
#   25|   		if [ $? -ne 0 ]; then
#   26|   			error "TLS certificate/key/DB '%s' was not found." "$cert"
#   27|-> 			retcoder=1
#   28|   			continue
#   29|   		fi

Error: SHELLCHECK_WARNING (CWE-398): [#def5]
/usr/libexec/openldap/check-config.sh:39:1: warning[SC2112]: 'function' keyword is non-standard. Delete it.
#   37|   }
#   38|   
#   39|-> function check_db_perms()
#   40|   {
#   41|   	retcode=0

Error: SHELLCHECK_WARNING (CWE-398): [#def6]
/usr/libexec/openldap/check-config.sh:44:17: warning[SC2044]: For loops over find output are fragile. Use find -exec or a while read loop.
#   42|   	for dbdir in `databases`; do
#   43|   		[ -d "$dbdir" ] || continue
#   44|-> 		for dbfile in `find ${dbdir} -maxdepth 1 -name "*.mdb"` ; do
#   45|   			run_as_ldap "/usr/bin/test -r \"$dbfile\" -a -w \"$dbfile\""
#   46|   			if [ $? -ne 0 ]; then

Error: SHELLCHECK_WARNING (CWE-398): [#def7]
/usr/libexec/openldap/check-config.sh:55:1: warning[SC2112]: 'function' keyword is non-standard. Delete it.
#   53|   }
#   54|   
#   55|-> function check_everything()
#   56|   {
#   57|   	retcode=0

Error: SHELLCHECK_WARNING (CWE-156): [#def8]
/usr/libexec/openldap/check-config.sh:64:6: warning[SC2046]: Quote this to prevent word splitting.
#   62|   }
#   63|   
#   64|-> if [ `id -u` -ne 0 ]; then
#   65|   	error "You have to be root to run this script."
#   66|   	exit 4

Error: GCC_ANALYZER_WARNING (CWE-457): [#def9]
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2153:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘len’
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2115:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2120:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2147:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2153:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2153:17: danger: use of uninitialized value ‘len’ here
# 2151|   		}
# 2152|   
# 2153|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2154|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2155|   	}

Error: COMPILER_WARNING (CWE-457): [#def10]
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c: scope_hint: In function ‘print_psearch’
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2153:17: warning[-Wmaybe-uninitialized]: ‘len’ may be used uninitialized
# 2153 |                 tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2154 |                         ldif ? "persistentSearch: " : "persistentSearch", buf, len );
#      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/clients/tools/common.c:2118:41: note: ‘len’ was declared here
# 2118 |                 int blen = sizeof(buf), len;
#      |                                         ^~~
# 2151|   		}
# 2152|   
# 2153|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2154|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2155|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:217:33: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘bvalue.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:199:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:203:23: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:210:12: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:214:10: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:215:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:216:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:216:33: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapcompare.c:217:33: danger: argument 1 (‘strdup(sep)’) from [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  215|   	if ( *sep != ':' ) {
#  216|   		bvalue.bv_val = strdup( sep );
#  217|-> 		bvalue.bv_len = strlen( bvalue.bv_val );
#  218|   
#  219|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:135:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘oldpw.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:128:32: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:131:42: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:135:40: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:135:32: danger: argument 1 (‘oldpw.bv_val’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  133|   			}
#  134|   		}
#  135|-> 		oldpw.bv_len = strlen( oldpw.bv_val );
#  136|   		break;
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def13]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:150:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘newpw.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:143:32: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:146:42: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:150:40: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldappasswd.c:150:32: danger: argument 1 (‘newpw.bv_val’) from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  148|   			}
#  149|   		}
#  150|-> 		newpw.bv_len = strlen( newpw.bv_val );
#  151|   		break;
#  152|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def14]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1556:25: warning[-Wanalyzer-null-argument]: use of NULL ‘fp’ where non-null expected
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1023:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1029:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1035:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1041:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1050:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1054:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1083:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1084:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1086:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1087:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1115:12: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1115:18: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1115:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1121:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1125:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1128:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1131:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1134:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1137:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1140:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1143:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1145:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1146:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1147:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1148:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1149:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1150:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1151:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1152:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1439:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1442:17: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1449:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1472:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1549:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1549:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapsearch.c:1556:25: danger: argument 3 (‘fp’) NULL where non-null expected
# 1554|   		rc = 0;
# 1555|   		first = 1;
# 1556|-> 		while ( fgets( line, sizeof( line ), fp ) != NULL ) { 
# 1557|   			line[ strlen( line ) - 1 ] = '\0';
# 1558|   			if ( !first ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:290:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:186:20: branch_false: following ‘false’ branch (when ‘opt != 72’)...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:201:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:210:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:214:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:288:58: release_memory: ‘0’ is NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:290:37: release_memory: ‘0’ is NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapurl.c:290:25: danger: dereference of NULL ‘realloc(lud.lud_exts, (long unsigned int)(nexts + 2) * 8) + (long unsigned int)nexts * 8’
#  288|   			lud.lud_exts = (char **)realloc( lud.lud_exts,
#  289|   				sizeof( char * ) * ( nexts + 2 ) );
#  290|-> 			lud.lud_exts[ nexts++ ] = optarg;
#  291|   			lud.lud_exts[ nexts ] = NULL;
#  292|   			break;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:301:31: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cred.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:299:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:300:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:300:31: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:301:31: danger: argument 1 (‘strdup(*<unknown>)’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  299|   	if (argc - optind > 0) {
#  300|   		cred.bv_val = strdup(argv[optind++]);
#  301|-> 		cred.bv_len = strlen(cred.bv_val);
#  302|   	}
#  303|   	if (argc - optind > 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:318:31: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cred.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:299:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:303:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:303:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:306:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:306:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:310:16: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:306:13: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:312:32: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:313:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:317:31: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:317:31: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:318:31: danger: argument 1 (‘strdup(lutil_getpass("User\'s password: "))’) from [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  316|   		}
#  317|   		cred.bv_val = strdup(userpw);
#  318|-> 		cred.bv_len = strlen(cred.bv_val);
#  319|   	}
#  320|   

Error: CPPCHECK_WARNING (CWE-476): [#def18]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:340: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  338|       if (req_authzid) {
#  339|   		vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  340|-> 		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  341|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  342|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def19]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:341: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  339|   		vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  340|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  341|-> 		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  342|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  343|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def20]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:342: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  340|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  341|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  342|-> 		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  343|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  344|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def21]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:343: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  341|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  342|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  343|-> 		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  344|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  345|   		vcctrls[++nvcctrls] = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def22]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:344: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  342|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  343|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  344|-> 		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  345|   		vcctrls[++nvcctrls] = NULL;
#  346|       }

Error: CPPCHECK_WARNING (CWE-476): [#def23]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:345: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  343|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  344|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  345|-> 		vcctrls[++nvcctrls] = NULL;
#  346|       }
#  347|   

Error: CPPCHECK_WARNING (CWE-476): [#def24]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:350: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  348|       if (req_pp) {
#  349|   		if (!vcctrls) vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  350|-> 		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  351|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  352|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def25]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:351: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  349|   		if (!vcctrls) vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  350|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  351|-> 		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  352|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  353|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def26]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:352: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  350|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  351|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  352|-> 		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  353|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  354|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def27]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:353: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  351|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  352|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  353|-> 		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  354|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  355|   		vcctrls[++nvcctrls] = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def28]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:354: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  352|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  353|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  354|-> 		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  355|   		vcctrls[++nvcctrls] = NULL;
#  356|       }

Error: CPPCHECK_WARNING (CWE-476): [#def29]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldapvc.c:355: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  353|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  354|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  355|-> 		vcctrls[++nvcctrls] = NULL;
#  356|       }
#  357|   

Error: COMPILER_WARNING: [#def30]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldcversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def31]
openldap-2.6.9/openldap-2.6.9/clients/tools/lddversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def32]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldeversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def33]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldmversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def34]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldpversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def35]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldrversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def36]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldsversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def37]
openldap-2.6.9/openldap-2.6.9/clients/tools/lduversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def38]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldvversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def39]
openldap-2.6.9/openldap-2.6.9/clients/tools/ldwversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING (CWE-477): [#def40]
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: scope_hint: In function ‘nthash’
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:179:9: warning[-Wdeprecated-declarations]: ‘MD4_Init’ is deprecated: Since OpenSSL 3.0
#  179 |         MD4_Init( &ctx );
#      |         ^~~~~~~~
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:72: included_from: Included from here.
/usr/include/openssl/md4.h:50:27: note: declared here
#   50 | OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c);
#      |                           ^~~~~~~~
#  177|   
#  178|   #ifdef HAVE_OPENSSL
#  179|-> 	MD4_Init( &ctx );
#  180|   	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|   	MD4_Final( (unsigned char *)hbuf, &ctx );

Error: COMPILER_WARNING (CWE-477): [#def41]
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:180:9: warning[-Wdeprecated-declarations]: ‘MD4_Update’ is deprecated: Since OpenSSL 3.0
#  180 |         MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#      |         ^~~~~~~~~~
/usr/include/openssl/md4.h:51:27: note: declared here
#   51 | OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len);
#      |                           ^~~~~~~~~~
#  178|   #ifdef HAVE_OPENSSL
#  179|   	MD4_Init( &ctx );
#  180|-> 	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|   	MD4_Final( (unsigned char *)hbuf, &ctx );
#  182|   #elif defined(HAVE_GNUTLS)

Error: COMPILER_WARNING (CWE-477): [#def42]
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:181:9: warning[-Wdeprecated-declarations]: ‘MD4_Final’ is deprecated: Since OpenSSL 3.0
#  181 |         MD4_Final( (unsigned char *)hbuf, &ctx );
#      |         ^~~~~~~~~
/usr/include/openssl/md4.h:52:27: note: declared here
#   52 | OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c);
#      |                           ^~~~~~~~~
#  179|   	MD4_Init( &ctx );
#  180|   	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|-> 	MD4_Final( (unsigned char *)hbuf, &ctx );
#  182|   #elif defined(HAVE_GNUTLS)
#  183|   	md4_init( &ctx );

Error: COMPILER_WARNING (CWE-665): [#def43]
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: scope_hint: At top level
openldap-2.6.9/openldap-2.6.9/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:625:39: warning[-Wmissing-braces]: missing braces around initializer
#  625 | static ConfigTable smbk5pwd_cfats[] = {
#      |                                       ^
#  623|    */
#  624|   
#  625|-> static ConfigTable smbk5pwd_cfats[] = {
#  626|   	{ "smbk5pwd-enable", "arg",
#  627|   		2, 0, 0, ARG_MAGIC|PC_SMB_ENABLE, smbk5pwd_cf_func,

Error: COMPILER_WARNING (CWE-457): [#def44]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:40: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/ac/signal.h:25:16: warning[-Wmaybe-uninitialized]: ‘sig’ may be used uninitialized
#   25 | #define SIGNAL lutil_sigaction
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:79:22: note: ‘sig’ was declared here
#   79 |         RETSIGTYPE (*sig)( int sig );
#      |                      ^~~
#   23|   
#   24|   #if defined( HAVE_SIGACTION )
#   25|-> #define SIGNAL lutil_sigaction
#   26|   typedef void (*lutil_sig_t)(int);
#   27|   LDAP_LUTIL_F(lutil_sig_t) lutil_sigaction( int sig, lutil_sig_t func );

Error: COMPILER_WARNING (CWE-457): [#def45]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:42: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c: scope_hint: In function ‘lutil_getpass’
openldap-2.6.9/openldap-2.6.9/include/ac/termios.h:32:48: warning[-Wmaybe-uninitialized]: ‘flags’ may be used uninitialized
#   32 | #define SETFLAGS( tio, flags )  ((tio).c_lflag = (flags))
#      |                                 ~~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:78:23: note: ‘flags’ was declared here
#   78 |         TERMFLAG_TYPE flags;
#      |                       ^~~~~
#   30|   #define SETATTR( fd, tiop )	tcsetattr((fd), TCSANOW /* 0 */, (tiop))
#   31|   #define GETFLAGS( tio )		((tio).c_lflag)
#   32|-> #define SETFLAGS( tio, flags )	((tio).c_lflag = (flags))
#   33|   
#   34|   #elif defined( HAVE_SGTTY_H )

Error: COMPILER_WARNING (CWE-457): [#def46]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/decode.c: scope_hint: In function ‘ber_get_stringbvl’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/decode.c:467:35: warning[-Wmaybe-uninitialized]: ‘res.bo’ may be used uninitialized
#  467 |                         res.bv[n] = bvp;
#      |                         ~~~~~~~~~~^~~~~
openldap-2.6.9/openldap-2.6.9/libraries/liblber/decode.c:393:11: note: ‘res.bo’ was declared here
#  393 |         } res;
#      |           ^~~
#  465|   				goto failed;
#  466|   			}
#  467|-> 			res.bv[n] = bvp;
#  468|   			*bvp = bv;
#  469|   			break;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def47]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:143:30: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:64:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:77:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:93:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:100:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:105:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:105:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:110:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:111:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:116:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:116:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:120:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:142:31: call_function: calling ‘getbuf’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:142:31: return_function: returning to ‘main’ from ‘getbuf’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/etest.c:143:30: danger: argument 1 (‘getbuf()’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  141|   		case 'B':	/* bit string */
#  142|   			buf = getbuf();
#  143|-> 			rc = ber_printf( ber, fmt, buf, strlen(buf) );
#  144|   			break;
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def48]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:766:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.bv_val’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:750:1: enter_function: entry to ‘ber_bvarray_dup_x’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:755:12: branch_false: following ‘false’ branch (when ‘src’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:761:15: call_function: calling ‘ber_memalloc_x’ from ‘ber_bvarray_dup_x’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:761:15: return_function: returning to ‘ber_bvarray_dup_x’ from ‘ber_memalloc_x’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:762:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:764:19: branch_true: following ‘true’ branch (when ‘i > j’)...
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:765:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:765:17: call_function: calling ‘ber_dupbv_x’ from ‘ber_bvarray_dup_x’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:765:17: return_function: returning to ‘ber_bvarray_dup_x’ from ‘ber_dupbv_x’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/memory.c:766:22: danger: use of uninitialized value ‘*<unknown>.bv_val’ here
#  764|   	for (j=0; j<i; j++) {
#  765|   		ber_dupbv_x( &new[j], &src[j], ctx );
#  766|-> 		if ( BER_BVISNULL( &new[j] )) {
#  767|   			ber_bvarray_free_x( new, ctx );
#  768|   			return -1;

Error: COMPILER_WARNING (CWE-563): [#def49]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/options.c: scope_hint: In function ‘ber_get_option’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/options.c:37:24: warning[-Wunused-but-set-variable]: variable ‘sb’ set but not used
#   37 |         const Sockbuf *sb;
#      |                        ^~
#   35|   {
#   36|   	const BerElement *ber;
#   37|-> 	const Sockbuf *sb;
#   38|   
#   39|   	if(outvalue == NULL) {

Error: COMPILER_WARNING (CWE-563): [#def50]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/options.c: scope_hint: In function ‘ber_set_option’
openldap-2.6.9/openldap-2.6.9/libraries/liblber/options.c:129:18: warning[-Wunused-but-set-variable]: variable ‘sb’ set but not used
#  129 |         Sockbuf *sb;
#      |                  ^~
#  127|   {
#  128|   	BerElement *ber;
#  129|-> 	Sockbuf *sb;
#  130|   
#  131|   	if(invalue == NULL) {

Error: COMPILER_WARNING: [#def51]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def52]
openldap-2.6.9/openldap-2.6.9/libraries/liblber/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: liblber.la 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def53]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/account_usability.c: scope_hint: In function ‘ldap_parse_accountusability_control’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/account_usability.c:54:15: warning[-Wunused-variable]: unused variable ‘last’
#   54 |         char *last;
#      |               ^~~~
#   52|   	ber_tag_t tag;
#   53|   	ber_len_t berLen;
#   54|-> 	char *last;
#   55|   
#   56|   	assert( ld != NULL );

Error: COMPILER_WARNING: [#def54]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/charray.c: scope_hint: In function ‘ldap_charray2str’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/charray.c:269:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#  269 |                 strncpy( p, *v, len );
#      |                 ^
openldap-2.6.9/openldap-2.6.9/libraries/libldap/charray.c:268:23: note: length computed here
#  268 |                 len = strlen( *v );
#      |                       ^~~~~~~~~~~~
#  267|   
#  268|   		len = strlen( *v );
#  269|-> 		strncpy( p, *v, len );
#  270|   		p += len;
#  271|   	}

Error: COMPILER_WARNING (CWE-563): [#def55]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/dnssrv.c:318:23: warning[-Wunused-but-set-variable]: variable ‘class’ set but not used
#  318 |             int type, class, ttl, size;
#      |                       ^~~~~
#  316|   
#  317|   	while (p < reply + len) {
#  318|-> 	    int type, class, ttl, size;
#  319|   	    status = dn_expand(reply, reply + len, p, host, sizeof(host));
#  320|   	    if (status < 0) {

Error: COMPILER_WARNING (CWE-563): [#def56]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/dnssrv.c: scope_hint: In function ‘ldap_domain2hostlist’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/dnssrv.c:318:30: warning[-Wunused-but-set-variable]: variable ‘ttl’ set but not used
#  318 |             int type, class, ttl, size;
#      |                              ^~~
#  316|   
#  317|   	while (p < reply + len) {
#  318|-> 	    int type, class, ttl, size;
#  319|   	    status = dn_expand(reply, reply + len, p, host, sizeof(host));
#  320|   	    if (status < 0) {

Error: CPPCHECK_WARNING (CWE-476): [#def57]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ftest.c:92: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: filter
#   90|   	BerElement *ber;
#   91|   
#   92|-> 	printf( "Filter: %s\n", filter );
#   93|   
#   94|   	ber = ber_alloc_t( LBER_USE_DER );

Error: COMPILER_WARNING (CWE-665): [#def58]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/init.c:39:9: warning[-Wmissing-braces]: missing braces around initializer
#   39 |         { LDAP_UNINITIALIZED, LDAP_DEBUG_NONE
#      |         ^
#   37|   
#   38|   struct ldapoptions ldap_int_global_options =
#   39|-> 	{ LDAP_UNINITIALIZED, LDAP_DEBUG_NONE
#   40|   		LDAP_LDO_NULLARG
#   41|   		LDAP_LDO_SOURCEIP_NULLARG

Error: COMPILER_WARNING (CWE-563): [#def59]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/init.c: scope_hint: In function ‘ldap_pvt_conf_option’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/init.c:264:13: warning[-Wunused-variable]: unused variable ‘rc’
#  264 |         int rc = LDAP_OPT_ERROR;
#      |             ^~
#  262|   {
#  263|   	struct ldapoptions *gopts;
#  264|-> 	int rc = LDAP_OPT_ERROR;
#  265|   
#  266|   	/* Get pointer to global option structure */

Error: COMPILER_WARNING (CWE-563): [#def60]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/init.c: scope_hint: In function ‘openldap_ldap_init_w_conf’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/init.c:286:13: warning[-Wunused-variable]: unused variable ‘i’
#  286 |         int i;
#      |             ^
#  284|   	char linebuf[ AC_LINE_MAX ];
#  285|   	FILE *fp;
#  286|-> 	int i;
#  287|   	char *cmd, *opt;
#  288|   	char *start, *end;

Error: COMPILER_WARNING (CWE-563): [#def61]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldif.c: scope_hint: In function ‘ldif_parse_line2’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldif.c:165:23: warning[-Wunused-variable]: unused variable ‘byte’
#  165 |                 char *byte = s;
#      |                       ^~~~
#  163|   
#  164|   	if ( b64 ) {
#  165|-> 		char *byte = s;
#  166|   
#  167|   		if ( *s == '\0' ) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def62]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:215:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idn’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:604:1: enter_function: entry to ‘ldap_parse_ldif_record’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:611:16: call_function: calling ‘ldap_parse_ldif_record_x’ from ‘ldap_parse_ldif_record’
#  213|   		i = 0;
#  214|   	} else {
#  215|-> 		i = idn+1;
#  216|   		/* Check for "control" tag after dn and before changetype. */
#  217|   		if ( BV_CASEMATCH( lr->lr_btype+i, &BV_CONTROL )) {

Error: COMPILER_WARNING (CWE-457): [#def63]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c: scope_hint: In function ‘ldap_parse_ldif_record_x’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:215:19: warning[-Wmaybe-uninitialized]: ‘idn’ may be used uninitialized
#  215 |                 i = idn+1;
#      |                 ~~^~~~~~~
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:116:22: note: ‘idn’ was declared here
#  116 |         int i, j, k, idn, nmods;
#      |                      ^~~
#  213|   		i = 0;
#  214|   	} else {
#  215|-> 		i = idn+1;
#  216|   		/* Check for "control" tag after dn and before changetype. */
#  217|   		if ( BV_CASEMATCH( lr->lr_btype+i, &BV_CONTROL )) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def64]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:424:31: warning[-Wanalyzer-null-argument]: use of NULL ‘<unknown>’ where non-null expected
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:604:1: enter_function: entry to ‘ldap_parse_ldif_record’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:611:16: call_function: calling ‘ldap_parse_ldif_record_x’ from ‘ldap_parse_ldif_record’
#  422|   					errstr, lr->lr_btype[i].bv_val, linenum+i - 1, dn );
#  423|   			}
#  424|-> 			if ( !BV_CASEMATCH( lr->lr_btype+i, &bv )) {
#  425|   				bvl[k++] = NULL;
#  426|   				bv = lr->lr_btype[i];

Error: GCC_ANALYZER_WARNING (CWE-688): [#def65]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:556:61: warning[-Wanalyzer-null-argument]: use of NULL ‘<unknown>’ where non-null expected
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:604:1: enter_function: entry to ‘ldap_parse_ldif_record’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:611:16: call_function: calling ‘ldap_parse_ldif_record_x’ from ‘ldap_parse_ldif_record’
#  554|   		if ( lr->lr_mops[i] == M_SEP )
#  555|   			continue;
#  556|-> 		if ( lr->lr_mops[i] != lr->lr_mops[i-1] || !BV_CASEMATCH( lr->lr_btype+i, &bv )) {
#  557|   			bvl[k++] = NULL;
#  558|   			bv = lr->lr_btype[i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def66]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:725:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ppctrls’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:634:12: branch_false: following ‘false’ branch (when ‘ppctrls’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:636:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:637:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:642:12: branch_false: following ‘false’ branch (when ‘s != s’)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:645:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:653:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:696:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:700:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:710:12: branch_false: following ‘false’ branch (when ‘pctrls’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:717:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:718:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:722:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/ldifutil.c:725:9: danger: dereference of NULL ‘ppctrls’
#  723|   	newctrl = NULL;
#  724|   	pctrls[i+1] = NULL;
#  725|-> 	*ppctrls = pctrls;
#  726|   
#  727|   cleanup:

Error: COMPILER_WARNING (CWE-563): [#def67]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/msctrl.c: scope_hint: In function ‘ldap_parse_dirsync_control’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/msctrl.c:125:25: warning[-Wunused-variable]: unused variable ‘len’
#  125 |         ber_len_t       len;
#      |                         ^~~
#  123|   	BerElement	*ber;
#  124|   	ber_tag_t	tag;
#  125|-> 	ber_len_t	len;
#  126|   	int unused;
#  127|   

Error: GCC_ANALYZER_WARNING (CWE-666): [#def68]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:450:22: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘s’ in wrong phase
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:724:35: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:727:41: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:736:44: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-ip.c:746:30: call_function: calling ‘ldap_pvt_connect’ from ‘ldap_connect_to_host’
#  448|   	do{
#  449|   		Debug0(LDAP_DEBUG_TRACE, "attempting to connect: \n" );
#  450|-> 		if ( connect(s, sin, addrlen) != AC_SOCKET_ERROR ) {
#  451|   			Debug0(LDAP_DEBUG_TRACE, "connect success\n" );
#  452|   

Error: COMPILER_WARNING (CWE-252): [#def69]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-local.c: scope_hint: In function ‘ldap_pvt_is_socket_ready’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/os-local.c:139:23: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  139 |                 (void)read(s, &ch, 1);
#      |                       ^~~~~~~~~~~~~~~
#  137|   	{
#  138|   		/* XXX: needs to be replace with ber_stream_read() */
#  139|-> 		(void)read(s, &ch, 1);
#  140|   		TRACE;
#  141|   		return -1;

Error: COMPILER_WARNING (CWE-563): [#def70]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/psearchctrl.c: scope_hint: In function ‘ldap_create_persistentsearch_control_value’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/psearchctrl.c:80:25: warning[-Wunused-variable]: unused variable ‘i’
#   80 |         int             i;
#      |                         ^
#   78|   	struct berval *value )
#   79|   {
#   80|-> 	int		i;
#   81|   	BerElement	*ber = NULL;
#   82|   	ber_tag_t	tag;

Error: COMPILER_WARNING (CWE-563): [#def71]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/psearchctrl.c: scope_hint: In function ‘ldap_parse_entrychange_control’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/psearchctrl.c:259:24: warning[-Wunused-variable]: unused variable ‘berTag’
#  259 |         ber_tag_t tag, berTag;
#      |                        ^~~~~~
#  257|   {
#  258|   	BerElement *ber;
#  259|-> 	ber_tag_t tag, berTag;
#  260|   	ber_len_t berLen;
#  261|   	ber_int_t chgtype;

Error: COMPILER_WARNING (CWE-563): [#def72]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/request.c: scope_hint: In function ‘ldap_send_server_request’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/request.c:387:38: warning[-Wunused-but-set-variable]: variable ‘rtag’ set but not used
#  387 |                 ber_tag_t       tag, rtag;
#      |                                      ^~~~
#  385|   		BerElement tmpber = *ber;
#  386|   		ber_int_t	bint;
#  387|-> 		ber_tag_t	tag, rtag;
#  388|   
#  389|   		ber_reset( &tmpber, 1 );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def73]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:662:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘lr’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:466:9: branch_true: following ‘true’ branch (when ‘ld’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:467:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:467:9: branch_true: following ‘true’ branch (when ‘lc’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:473:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:486:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:489:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:537:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:546:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:551:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:614:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:620:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:624:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:662:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:662:14: danger: use of uninitialized value ‘lr’ here
#  660|   	}
#  661|   
#  662|-> 	id = lr->lr_origid;
#  663|   	refer_cnt = 0;
#  664|   	hadref = simple_request = 0;

Error: COMPILER_WARNING (CWE-457): [#def74]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:662:16: warning[-Wmaybe-uninitialized]: ‘lr’ may be used uninitialized
#  662 |         id = lr->lr_origid;
#      |              ~~^~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c: scope_hint: In function ‘wait4msg’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/result.c:456:26: note: ‘lr’ was declared here
#  456 |         LDAPRequest     *lr, *tmplr, dummy_lr = { 0 };
#      |                          ^~
#  660|   	}
#  661|   
#  662|-> 	id = lr->lr_origid;
#  663|   	refer_cnt = 0;
#  664|   	hadref = simple_request = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def75]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:210:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘msgid’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:174:1: enter_function: entry to ‘ldap_sasl_bind_s’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:190:11: branch_false: following ‘false’ branch (when ‘servercredp’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:198:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:198:14: call_function: calling ‘ldap_sasl_bind’ from ‘ldap_sasl_bind_s’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:198:14: return_function: returning to ‘ldap_sasl_bind_s’ from ‘ldap_sasl_bind’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:200:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:205:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:205:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:210:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:210:14: danger: use of uninitialized value ‘msgid’ here
#  208|   #endif
#  209|   
#  210|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) {
#  211|   		return( ld->ld_errno );	/* ldap_result sets ld_errno */
#  212|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def76]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:536:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘msgid’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:506:1: enter_function: entry to ‘ldap_sasl_interactive_bind_s’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:521:22: call_function: calling ‘ldap_sasl_interactive_bind’ from ‘ldap_sasl_interactive_bind_s’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:521:22: return_function: returning to ‘ldap_sasl_interactive_bind_s’ from ‘ldap_sasl_interactive_bind’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:531:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:531:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:536:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/sasl.c:536:22: danger: use of uninitialized value ‘msgid’ here
#  534|   #endif
#  535|   
#  536|-> 		if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) {
#  537|   			return( ld->ld_errno );	/* ldap_result sets ld_errno */
#  538|   		}

Error: COMPILER_WARNING: [#def77]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c: scope_hint: In function ‘append_to_safe_string.isra.0’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c:191:9: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length
#  191 |         strncpy(&ss->val[ss->pos], s, l);
#      |         ^
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c:166:17: note: length computed here
#  166 |         int l = strlen(s);
#      |                 ^~~~~~~~~
#  189|   		ss->val = temp;
#  190|   	}
#  191|-> 	strncpy(&ss->val[ss->pos], s, l);
#  192|   	ss->pos += l;
#  193|   	if ( ss->pos > 0 && LDAP_SPACE(ss->val[ss->pos-1]) )

Error: COMPILER_WARNING (CWE-563): [#def78]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c: scope_hint: In function ‘ldap_str2structurerule’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c:3000:22: warning[-Wunused-but-set-variable]: variable ‘savepos’ set but not used
# 3000 |         const char * savepos;
#      |                      ^~~~~~~
# 2998|   	LDAPStructureRule * sr;
# 2999|   	char ** ext_vals;
# 3000|-> 	const char * savepos;
# 3001|   
# 3002|   	if ( !s ) {

Error: COMPILER_WARNING (CWE-563): [#def79]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c: scope_hint: In function ‘ldap_str2nameform’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/schema.c:3186:22: warning[-Wunused-but-set-variable]: variable ‘savepos’ set but not used
# 3186 |         const char * savepos;
#      |                      ^~~~~~~
# 3184|   	LDAPNameForm * nf;
# 3185|   	char ** ext_vals;
# 3186|-> 	const char * savepos;
# 3187|   
# 3188|   	if ( !s ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#   80|   	result = (char **) 0;
#   81|   	while ( 1 ) {
#   82|-> 		get_line( buf, sizeof(buf), stdin, prompt );
#   83|   
#   84|   		if ( *buf == '\0' )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#   80|   	result = (char **) 0;
#   81|   	while ( 1 ) {
#   82|-> 		get_line( buf, sizeof(buf), stdin, prompt );
#   83|   
#   84|   		if ( *buf == '\0' )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:88:44: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:573:33: call_function: calling ‘get_list’ from ‘main’
#   86|   
#   87|   		if ( result == (char **) 0 )
#   88|-> 			result = (char **) malloc( sizeof(char *) );
#   89|   		else
#   90|   			result = (char **) realloc( result,

Error: CPPCHECK_WARNING (CWE-401): [#def83]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:90: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#   88|   			result = (char **) malloc( sizeof(char *) );
#   89|   		else
#   90|-> 			result = (char **) realloc( result,
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:90:44: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#   88|   			result = (char **) malloc( sizeof(char *) );
#   89|   		else
#   90|-> 			result = (char **) realloc( result,
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   

Error: CPPCHECK_WARNING (CWE-476): [#def85]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:93: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   
#   93|-> 		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|   	if ( result == (char **) 0 )

Error: GCC_ANALYZER_WARNING (CWE-122): [#def86]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:93:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:573:33: call_function: calling ‘get_list’ from ‘main’
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   
#   93|-> 		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|   	if ( result == (char **) 0 )

Error: GCC_ANALYZER_WARNING (CWE-476): [#def87]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:93:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:573:33: call_function: calling ‘get_list’ from ‘main’
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   
#   93|-> 		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|   	if ( result == (char **) 0 )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:95:12: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#   93|   		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|-> 	if ( result == (char **) 0 )
#   96|   		return( NULL );
#   97|   	result = (char **) realloc( result, sizeof(char *) * (num + 1) );

Error: CPPCHECK_WARNING (CWE-401): [#def89]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:97: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#   95|   	if ( result == (char **) 0 )
#   96|   		return( NULL );
#   97|-> 	result = (char **) realloc( result, sizeof(char *) * (num + 1) );
#   98|   	result[num] = NULL;
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:98:9: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#   96|   		return( NULL );
#   97|   	result = (char **) realloc( result, sizeof(char *) * (num + 1) );
#   98|-> 	result[num] = NULL;
#   99|   
#  100|   	return( result );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:98:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#   96|   		return( NULL );
#   97|   	result = (char **) realloc( result, sizeof(char *) * (num + 1) );
#   98|-> 	result[num] = NULL;
#   99|   
#  100|   	return( result );

Error: COMPILER_WARNING (CWE-563): [#def92]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c: scope_hint: In function ‘file_read’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:123:25: warning[-Wunused-but-set-variable]: variable ‘eof’ set but not used
#  123 |         int             eof;
#      |                         ^~~
#  121|   	FILE		*fp;
#  122|   	ber_slen_t	rlen;
#  123|-> 	int		eof;
#  124|   
#  125|   	if (( fp = fopen( path, "r" )) == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def93]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:136:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bv’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  134|   	}
#  135|   
#  136|-> 	bv->bv_len = ftell( fp );
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def94]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:197:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  195|   			int	i;
#  196|   
#  197|-> 			for ( i = 0; tmp.mod_values[i] != NULL; ++i )
#  198|   				;
#  199|   			bvals = (struct berval **)calloc( i + 1,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:201:38: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  199|   			bvals = (struct berval **)calloc( i + 1,
#  200|   			    sizeof( struct berval *));
#  201|-> 			for ( i = 0; tmp.mod_values[i] != NULL; ++i ) {
#  202|   				bvals[i] = (struct berval *)malloc(
#  203|   				    sizeof( struct berval ));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def96]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:202:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bvals’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  200|   			    sizeof( struct berval *));
#  201|   			for ( i = 0; tmp.mod_values[i] != NULL; ++i ) {
#  202|-> 				bvals[i] = (struct berval *)malloc(
#  203|   				    sizeof( struct berval ));
#  204|   				if ( strncmp( tmp.mod_values[i], "{FILE}",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:206:44: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  204|   				if ( strncmp( tmp.mod_values[i], "{FILE}",
#  205|   				    6 ) == 0 ) {
#  206|-> 					if ( file_read( tmp.mod_values[i] + 6,
#  207|   					    bvals[i] ) < 0 ) {
#  208|   						free( bvals );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:208:49: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  206|   					if ( file_read( tmp.mod_values[i] + 6,
#  207|   					    bvals[i] ) < 0 ) {
#  208|-> 						free( bvals );
#  209|   						for ( i = 0; i<num; i++ )
#  210|   							free( result[ i ] );

Error: CPPCHECK_WARNING (CWE-401): [#def99]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:212: error[memleak]: Memory leak: tmp.mod_type
#  210|   							free( result[ i ] );
#  211|   						free( result );
#  212|-> 						return( NULL );
#  213|   					}
#  214|   				} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:212:55: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  210|   							free( result[ i ] );
#  211|   						free( result );
#  212|-> 						return( NULL );
#  213|   					}
#  214|   				} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def101]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:215:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(16)’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  213|   					}
#  214|   				} else {
#  215|-> 					bvals[i]->bv_val = tmp.mod_values[i];
#  216|   					bvals[i]->bv_len =
#  217|   					    strlen( tmp.mod_values[i] );

Error: CPPCHECK_WARNING (CWE-401): [#def102]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:227: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#  225|   			result = (LDAPMod **) malloc( sizeof(LDAPMod *) );
#  226|   		else
#  227|-> 			result = (LDAPMod **) realloc( result,
#  228|   			    sizeof(LDAPMod *) * (num + 1) );
#  229|   

Error: CPPCHECK_WARNING (CWE-476): [#def103]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:230: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  228|   			    sizeof(LDAPMod *) * (num + 1) );
#  229|   
#  230|-> 		result[num] = (LDAPMod *) malloc( sizeof(LDAPMod) );
#  231|   		*(result[num]) = tmp;	/* struct copy */
#  232|   		num++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def104]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:230:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  228|   			    sizeof(LDAPMod *) * (num + 1) );
#  229|   
#  230|-> 		result[num] = (LDAPMod *) malloc( sizeof(LDAPMod) );
#  231|   		*(result[num]) = tmp;	/* struct copy */
#  232|   		num++;

Error: CPPCHECK_WARNING (CWE-476): [#def105]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:231: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  229|   
#  230|   		result[num] = (LDAPMod *) malloc( sizeof(LDAPMod) );
#  231|-> 		*(result[num]) = tmp;	/* struct copy */
#  232|   		num++;
#  233|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def106]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:231:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(24)’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  229|   
#  230|   		result[num] = (LDAPMod *) malloc( sizeof(LDAPMod) );
#  231|-> 		*(result[num]) = tmp;	/* struct copy */
#  232|   		num++;
#  233|   	}

Error: CPPCHECK_WARNING (CWE-401): [#def107]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:236: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#  234|   	if ( result == NULL )
#  235|   		return( NULL );
#  236|-> 	result = (LDAPMod **) realloc( result, sizeof(LDAPMod *) * (num + 1) );
#  237|   	result[num] = NULL;
#  238|   

Error: COMPILER_WARNING (CWE-563): [#def108]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c: scope_hint: In function ‘main’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/test.c:282:25: warning[-Wunused-but-set-variable]: variable ‘bound’ set but not used
#  282 |         int             bound, all, scope, attrsonly;
#      |                         ^~~~~
#  280|   	static const char usage[] =
#  281|   		"usage: %s [-u] [-h host] [-d level] [-s dnsuffix] [-p port] [-t file] [-T file]\n";
#  282|-> 	int		bound, all, scope, attrsonly;
#  283|   	LDAPMessage	*res;
#  284|   	LDAPMod		**mods, **attrs;

Error: COMPILER_WARNING (CWE-563): [#def109]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/threads.c: scope_hint: In function ‘ldap_pvt_thread_initialize’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/threads.c:45:27: warning[-Wunused-but-set-variable]: variable ‘tid’ set but not used
#   45 |         ldap_pvt_thread_t tid;
#      |                           ^~~
#   43|   	int rc;
#   44|   	static int init = 0;
#   45|-> 	ldap_pvt_thread_t tid;
#   46|   
#   47|   	/* we only get one shot at this */

Error: COMPILER_WARNING (CWE-563): [#def110]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/tls2.c: scope_hint: In function ‘ldap_int_tls_start’
openldap-2.6.9/openldap-2.6.9/libraries/libldap/tls2.c:1136:15: warning[-Wunused-variable]: unused variable ‘ssl’
# 1136 |         void *ssl;
#      |               ^~~
# 1134|   	Sockbuf *sb;
# 1135|   	char *host;
# 1136|-> 	void *ssl;
# 1137|   	int ret, async;
# 1138|   	struct timeval start_time_tv, tv, tv0;

Error: COMPILER_WARNING: [#def111]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def112]
openldap-2.6.9/openldap-2.6.9/libraries/libldap/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: libldap.la 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING (CWE-401): [#def113]
openldap-2.6.9/openldap-2.6.9/libraries/liblmdb/midl.c:135: error[memleakOnRealloc]: Common realloc mistake: 'idn' nulled but not freed upon failure
#  133|   	MDB_IDL idn = *idp-1;
#  134|   	/* grow it */
#  135|-> 	idn = realloc(idn, (*idn + num + 2) * sizeof(MDB_ID));
#  136|   	if (!idn)
#  137|   		return ENOMEM;

Error: COMPILER_WARNING (CWE-563): [#def114]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ucstr.c: scope_hint: In function ‘UTF8bvnormalize’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ucstr.c:111:58: warning[-Wunused-but-set-variable]: variable ‘last’ set but not used
#  111 |         int i, j, len, clen, outpos, ucsoutlen, outsize, last;
#      |                                                          ^~~~
#  109|   	void *ctx )
#  110|   {
#  111|-> 	int i, j, len, clen, outpos, ucsoutlen, outsize, last;
#  112|   	int didnewbv = 0;
#  113|   	char *out, *outtmp, *s;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def115]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:526:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rp’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1690:1: enter_function: entry to ‘ure_compile’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1698:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1716:17: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1720:5: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1726:18: call_function: calling ‘_ure_re2nfa’ from ‘ure_compile’
#  524|   
#  525|       ccl->ranges_used++;
#  526|->     rp->min_code = r->min_code;
#  527|       rp->max_code = r->max_code;
#  528|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1017:13: warning[-Wanalyzer-malloc-leak]: leak of ‘symbol.sym.ccl.ranges’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1690:1: enter_function: entry to ‘ure_compile’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1698:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1716:17: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1720:5: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1726:18: call_function: calling ‘_ure_re2nfa’ from ‘ure_compile’
# 1015|   
# 1016|           if (0xdc00 <= *sp && *sp <= 0xdfff) {
# 1017|->             symp->sym.chr = 0x10000 + (((symp->sym.chr & 0x03ff) << 10) |
# 1018|                                          (*sp & 0x03ff));
# 1019|               sp++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1103:16: warning[-Wanalyzer-malloc-leak]: leak of ‘symbol.sym.ccl.ranges’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1690:1: enter_function: entry to ‘ure_compile’
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1698:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1716:17: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1720:5: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure.c:1726:18: call_function: calling ‘_ure_re2nfa’ from ‘ure_compile’
# 1101|             free((char *) symbol.sym.ccl.ranges);
# 1102|   
# 1103|->         return b->symtab[i].id;
# 1104|       }
# 1105|   

Error: CPPCHECK_WARNING (CWE-682): [#def118]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1116: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
# 1114|                 realloc((char *) b->symtab,
# 1115|                         sizeof(_ure_symtab_t) * (b->symtab_size + 8));
# 1116|->         sp = b->symtab + b->symtab_size;
# 1117|           (void) memset((char *) sp, '\0', sizeof(_ure_symtab_t) << 3);
# 1118|           b->symtab_size += 8;

Error: CPPCHECK_WARNING (CWE-682): [#def119]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1337: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
# 1335|                     realloc((char *) b->states.states,
# 1336|                             sizeof(_ure_state_t) * (b->states.states_size + 8));
# 1337|->             sp = b->states.states + b->states.states_size;
# 1338|               (void) memset((char *) sp, '\0', sizeof(_ure_state_t) << 3);
# 1339|               b->states.states_size += 8;

Error: CPPCHECK_WARNING (CWE-476): [#def120]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1745: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1743|       (void) memset((char *) dfa, '\0', sizeof(_ure_dfa_t));
# 1744|   
# 1745|->     dfa->flags = buf->flags & (_URE_DFA_CASEFOLD|_URE_DFA_BLANKLINE);
# 1746|   
# 1747|       /*

Error: CPPCHECK_WARNING (CWE-476): [#def121]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1755: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1753|             free((char *) buf->symtab[i].states.slist);
# 1754|       }
# 1755|->     dfa->syms = buf->symtab;
# 1756|       dfa->nsyms = buf->symtab_used;
# 1757|   

Error: CPPCHECK_WARNING (CWE-476): [#def122]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1756: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1754|       }
# 1755|       dfa->syms = buf->symtab;
# 1756|->     dfa->nsyms = buf->symtab_used;
# 1757|   
# 1758|       buf->symtab_used = buf->symtab_size = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def123]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1775: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1773|        * Allocate enough space for the states and transitions.
# 1774|        */
# 1775|->     dfa->states = (_ure_dstate_t *) malloc(sizeof(_ure_dstate_t) *
# 1776|                                              dfa->nstates);
# 1777|       dfa->trans = (_ure_trans_t *) malloc(sizeof(_ure_trans_t) * dfa->ntrans);

Error: CPPCHECK_WARNING (CWE-476): [#def124]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1776: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1774|        */
# 1775|       dfa->states = (_ure_dstate_t *) malloc(sizeof(_ure_dstate_t) *
# 1776|->                                            dfa->nstates);
# 1777|       dfa->trans = (_ure_trans_t *) malloc(sizeof(_ure_trans_t) * dfa->ntrans);
# 1778|   

Error: CPPCHECK_WARNING (CWE-476): [#def125]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1777: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1775|       dfa->states = (_ure_dstate_t *) malloc(sizeof(_ure_dstate_t) *
# 1776|                                              dfa->nstates);
# 1777|->     dfa->trans = (_ure_trans_t *) malloc(sizeof(_ure_trans_t) * dfa->ntrans);
# 1778|   
# 1779|       /*

Error: CPPCHECK_WARNING (CWE-476): [#def126]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1782: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1780|        * Actually transfer the DFA states from the buffer.
# 1781|        */
# 1782|->     dsp = dfa->states;
# 1783|       tp = dfa->trans;
# 1784|       for (i = state = 0, sp = buf->states.states; i < buf->states.states_used;

Error: CPPCHECK_WARNING (CWE-476): [#def127]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1783: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dfa
# 1781|        */
# 1782|       dsp = dfa->states;
# 1783|->     tp = dfa->trans;
# 1784|       for (i = state = 0, sp = buf->states.states; i < buf->states.states_used;
# 1785|            i++, sp++) {

Error: CPPCHECK_WARNING (CWE-758): [#def128]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/ure.c:1859: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1857|                     fprintf(out, "\\p");
# 1858|                   for (k = h = 0; k < 32; k++) {
# 1859|->                     if (sym->props & (1 << k)) {
# 1860|                           if (h != 0)
# 1861|                             putc(',', out);

Error: CPPCHECK_WARNING (CWE-758): [#def129]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/ure/urestubs.c:120: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  118|   
#  119|   	for( i=0; i<32; i++ ) {
#  120|-> 		if( props & (1 << i) ) {
#  121|   			mask1 |= masks[i].mask1;
#  122|   			mask2 |= masks[i].mask2;

Error: COMPILER_WARNING: [#def130]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def131]
openldap-2.6.9/openldap-2.6.9/libraries/liblunicode/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: liblunicode.a 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:141:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:71:12: branch_true: following ‘true’ branch (when ‘debug == 0’)...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:72:30: branch_true: following ‘true’ branch (when ‘i != 5’)...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:76:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:93:28: acquire_resource: opened here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:93:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:100:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:104:25: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:114:20: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/detach.c:141:16: danger: ‘sd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  139|   
#  140|   #ifdef SIGPIPE
#  141|-> 	(void) SIGNAL( SIGPIPE, SIG_IGN );
#  142|   #endif
#  143|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def133]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:125:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:114:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:124:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:124:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:125:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:125:23: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  123|   #endif
#  124|   	if ( c == EOF )
#  125|-> 		return( NULL );
#  126|   	pbuf[i] = '\0';
#  127|   	return (pbuf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:125:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:114:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:124:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:124:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:125:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/getpass.c:125:23: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  123|   #endif
#  124|   	if ( c == EOF )
#  125|-> 		return( NULL );
#  126|   	pbuf[i] = '\0';
#  127|   	return (pbuf);

Error: COMPILER_WARNING: [#def135]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/hash.c:69:33: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#   69 | lutil_HASHFinal( unsigned char *digest, lutil_HASH_CTX *ctx )
#      |                  ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/portable.h:1189: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/hash.c:22: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/lutil_hash.h:52:23: note: previously declared as an array ‘unsigned char[4]’
#   52 |         unsigned char digest[LUTIL_HASH_BYTES],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#   67|    */
#   68|   void
#   69|-> lutil_HASHFinal( unsigned char *digest, lutil_HASH_CTX *ctx )
#   70|   {
#   71|   	ber_uint_t h = ctx->hash;

Error: COMPILER_WARNING: [#def136]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/hash.c:128:35: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#  128 | lutil_HASH64Final( unsigned char *digest, lutil_HASH_CTX *ctx )
#      |                    ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/lutil_hash.h:71:23: note: previously declared as an array ‘unsigned char[8]’
#   71 |         unsigned char digest[LUTIL_HASH64_BYTES],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  126|    */
#  127|   void
#  128|-> lutil_HASH64Final( unsigned char *digest, lutil_HASH_CTX *ctx )
#  129|   {
#  130|   	unsigned long long h = ctx->hash64;

Error: COMPILER_WARNING: [#def137]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/md5.c:150:32: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#  150 | lutil_MD5Final( unsigned char *digest, struct lutil_MD5Context *ctx )
#      |                 ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/portable.h:1189: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/md5.c:46: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/lutil_md5.h:49:23: note: previously declared as an array ‘unsigned char[16]’
#   49 |         unsigned char digest[16],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  148|    */
#  149|   void
#  150|-> lutil_MD5Final( unsigned char *digest, struct lutil_MD5Context *ctx )
#  151|   {
#  152|   	unsigned count;

Error: COMPILER_WARNING: [#def138]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/md5.c:211:33: warning[-Warray-parameter=]: argument 1 of type ‘ber_uint_t *’ {aka ‘unsigned int *’} declared as a pointer
#  211 | lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#      |                     ~~~~~~~~~~~~^~~
openldap-2.6.9/openldap-2.6.9/include/lutil_md5.h:54:20: note: previously declared as an array ‘ber_uint_t[4]’ {aka ‘unsigned int[4]’}
#   54 |         ber_uint_t buf[4],
#      |         ~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  209|    */
#  210|   void
#  211|-> lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#  212|   {
#  213|   	register ber_uint_t a, b, c, d;

Error: COMPILER_WARNING: [#def139]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/md5.c:211:59: warning[-Warray-parameter=]: argument 2 of type ‘const unsigned char *’ declared as a pointer
#  211 | lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#      |                                      ~~~~~~~~~~~~~~~~~~~~~^~~~~
openldap-2.6.9/openldap-2.6.9/include/lutil_md5.h:55:29: note: previously declared as an array ‘const unsigned char[64]’
#   55 |         const unsigned char in[64]));
#      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  209|    */
#  210|   void
#  211|-> lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#  212|   {
#  213|   	register ber_uint_t a, b, c, d;

Error: COMPILER_WARNING: [#def140]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/sha1.c:80:30: warning[-Warray-parameter=]: argument 1 of type ‘uint32 *’ {aka ‘unsigned int *’} declared as a pointer
#   80 | lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#      |                      ~~~~~~~~^~~~~
openldap-2.6.9/openldap-2.6.9/include/portable.h:1189: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/sha1.c:39: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/lutil_sha1.h:47:24: note: previously declared as an array ‘uint32[5]’ {aka ‘unsigned int[5]’}
#   47 |         LDAP_P((uint32 state[5], const unsigned char buffer[64]));
#      |                 ~~~~~~~^~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#   78|    */
#   79|   void
#   80|-> lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#   81|   {
#   82|       uint32 a, b, c, d, e;

Error: COMPILER_WARNING: [#def141]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/sha1.c:80:58: warning[-Warray-parameter=]: argument 2 of type ‘const unsigned char *’ declared as a pointer
#   80 | lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#      |                                     ~~~~~~~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/lutil_sha1.h:47:54: note: previously declared as an array ‘const unsigned char[64]’
#   47 |         LDAP_P((uint32 state[5], const unsigned char buffer[64]));
#      |                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#   78|    */
#   79|   void
#   80|-> lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#   81|   {
#   82|       uint32 a, b, c, d, e;

Error: COMPILER_WARNING: [#def142]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/sha1.c:182:33: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#  182 | lutil_SHA1Final( unsigned char *digest, lutil_SHA1_CTX *context )
#      |                  ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.9/openldap-2.6.9/include/lutil_sha1.h:59:31: note: previously declared as an array ‘unsigned char[20]’
#   59 |         LDAP_P((unsigned char digest[20], lutil_SHA1_CTX *context));
#      |                 ~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  180|    */
#  181|   void
#  182|-> lutil_SHA1Final( unsigned char *digest, lutil_SHA1_CTX *context )
#  183|   {
#  184|       unsigned int i;

Error: CPPCHECK_WARNING (CWE-457): [#def143]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:778: warning[uninitvar]: Uninitialized variable: j
#  776|   			}
#  777|   		}
#  778|-> 		j++;
#  779|   		prev->beg += j;
#  780|   		prev->len -= j;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def144]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:778:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘j’
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:763:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:764:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:764:40: branch_false: following ‘false’ branch (when ‘i < 0’)...
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:778:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/utils.c:778:17: danger: use of uninitialized value ‘j’ here
#  776|   			}
#  777|   		}
#  778|-> 		j++;
#  779|   		prev->beg += j;
#  780|   		prev->len -= j;

Error: COMPILER_WARNING: [#def145]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def146]
openldap-2.6.9/openldap-2.6.9/libraries/liblutil/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: liblutil.a 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING (CWE-457): [#def147]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/config.c:376: error[uninitvar]: Uninitialized variables: tmp.lb_type, tmp.lb_private, tmp.lb_mapper, tmp.lb_mutex
#  374|   
#  375|   	return ( struct rewrite_builtin_map * )ldap_avl_find( info->li_maps,
#  376|-> 			( caddr_t )&tmp, rewrite_builtin_map_cmp );
#  377|   }
#  378|   

Error: CPPCHECK_WARNING (CWE-457): [#def148]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/context.c:89: error[uninitvar]: Uninitialized variables: c.lc_alias, c.lc_rule
#   87|   	c.lc_name = (char *)rewriteContext;
#   88|   	context = (struct rewrite_context *)ldap_avl_find( info->li_context, 
#   89|-> 			(caddr_t)&c, rewrite_context_cmp );
#   90|   	if ( context == NULL ) {
#   91|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:136:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:99:9: branch_true: following ‘true’ branch (when ‘fname’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:100:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:100:9: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:102:16: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:103:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:107:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:107:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:115:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:121:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:126:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:126:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:135:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/ldapmap.c:136:9: danger: dereference of NULL ‘p’
#  134|   	/* trim everything after [host][:port] */
#  135|   	p = strchr( data->lm_url, '/' );
#  136|-> 	assert( p[ 1 ] == '/' );
#  137|   	if ( ( p = strchr( p + 2, '/' ) ) != NULL ) {
#  138|   		p[ 0 ] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def150]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:172:23: warning[-Wanalyzer-null-argument]: use of NULL ‘begin’ where non-null expected
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:48:9: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:49:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:49:9: branch_true: following ‘true’ branch (when ‘string’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:50:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:50:9: branch_true: following ‘true’ branch (when ‘currpos’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:52:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:57:36: branch_true: following ‘true’ branch (when ‘cnt != 0’)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:58:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:81:12: branch_false: following ‘false’ branch (when ‘cnt == 0’)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:84:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:91:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:94:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:152:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:156:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/map.c:172:23: danger: argument 1 (‘begin’) NULL where non-null expected
#  170|   
#  171|   	default:
#  172|-> 		end = strrchr( begin, ')' );
#  173|   		if ( end == NULL ) {
#  174|   			rc = -1;

Error: CPPCHECK_WARNING (CWE-457): [#def151]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/session.c:92: error[uninitvar]: Uninitialized variables: tmp.ls_vars, tmp.ls_vars_mutex, tmp.ls_mutex, tmp.ls_count
#   90|   	tmp.ls_cookie = ( void * )cookie;
#   91|   	session = ( struct rewrite_session * )ldap_avl_find( info->li_cookies, 
#   92|-> 			( caddr_t )&tmp, rewrite_cookie_cmp );
#   93|   	if ( session ) {
#   94|   		session->ls_count++;

Error: CPPCHECK_WARNING (CWE-457): [#def152]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/session.c:165: error[uninitvar]: Uninitialized variables: tmp.ls_vars, tmp.ls_vars_mutex, tmp.ls_mutex, tmp.ls_count
#  163|   #endif /* USE_REWRITE_LDAP_PVT_THREADS */
#  164|   	session = ( struct rewrite_session * )ldap_avl_find( info->li_cookies,
#  165|-> 			( caddr_t )&tmp, rewrite_cookie_cmp );
#  166|   #ifdef USE_REWRITE_LDAP_PVT_THREADS
#  167|   	if ( session ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def153]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:318:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘submatch’
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:275:1: enter_function: entry to ‘rewrite_subst_apply’
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:289:9: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:290:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:290:9: branch_true: following ‘true’ branch (when ‘op’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:291:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:291:9: branch_true: following ‘true’ branch (when ‘subst’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:292:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:292:9: branch_true: following ‘true’ branch (when ‘string’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:293:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:293:9: branch_true: following ‘true’ branch (when ‘match’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:294:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:294:9: branch_true: following ‘true’ branch (when ‘val’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:296:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:296:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:298:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:304:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:305:28: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:307:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:315:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:315:29: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:316:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:326:30: call_function: calling ‘submatch_copy’ from ‘rewrite_subst_apply’
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:326:30: return_function: returning to ‘rewrite_subst_apply’ from ‘submatch_copy’
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:328:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:367:26: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:315:29: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:316:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/subst.c:343:38: call_function: calling ‘rewrite_subst_apply’ from ‘rewrite_subst_apply’
#  316|   		struct berval	key = { 0, NULL };
#  317|   
#  318|-> 		submatch[ n ].bv_val = NULL;
#  319|   		
#  320|   		/*

Error: CPPCHECK_WARNING (CWE-457): [#def154]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/var.c:116: error[uninitvar]: Uninitialized variables: var.lv_flags, var.lv_value
#  114|   	var.lv_name = ( char * )name;
#  115|   	return ( struct rewrite_var * )ldap_avl_find( tree, 
#  116|-> 			( caddr_t )&var, rewrite_var_cmp );
#  117|   }
#  118|   

Error: COMPILER_WARNING: [#def155]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def156]
openldap-2.6.9/openldap-2.6.9/libraries/librewrite/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: librewrite.a 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-131): [#def157]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:627:5: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:550:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:555:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:586:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:592:5: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:595:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:601:5: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:603:5: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:605:10: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:626:5: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:627:5: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/client.c:627:5: danger: assigned to ‘struct LloadConnection *’ here; ‘sizeof (struct LloadConnection)’ is ‘464’
#  625|   
#  626|       checked_lock( &clients_mutex );
#  627|->     LDAP_CIRCLEQ_INSERT_TAIL( &clients, c, c_next );
#  628|       checked_unlock( &clients_mutex );
#  629|       CONNECTION_UNLOCK(c);

Error: COMPILER_WARNING (CWE-665): [#def158]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/config.c:184:45: warning[-Wmissing-braces]: missing braces around initializer
#  184 | static ConfigTable config_back_cf_table[] = {
#      |                                             ^
#  182|   /* alphabetical ordering */
#  183|   
#  184|-> static ConfigTable config_back_cf_table[] = {
#  185|       /* This attr is read-only */
#  186|       { "", "", 0, 0, 0,

Error: COMPILER_WARNING (CWE-681): [#def159]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/config.c: scope_hint: In function ‘lload_config_find_keyword’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/config.c:2280:48: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘lutil_b64_pton’ differ in signedness
# 2280 |         c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
#      |                                               ~^~~~~~~
#      |                                                |
#      |                                                char *
openldap-2.6.9/openldap-2.6.9/include/portable.h:1189: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/servers/lloadd/config.c:27: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/lutil.h:55:9: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#   55 |         unsigned char *,
#      |         ^~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
# 2278|           ch_free( c->tline );
# 2279|           c->tline = ch_malloc( decode_len + 1 );
# 2280|->         c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
# 2281|           if ( c->linelen < 0 ) {
# 2282|               ch_free( c->tline );

Error: CPPCHECK_WARNING (CWE-476): [#def160]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:257: warning[nullPointer]: Possible null pointer dereference: host
#  255|           sap[1] = NULL;
#  256|   
#  257|->         if ( strlen( host ) >
#  258|                   ( sizeof( ((struct sockaddr_un *)*sap)->sun_path ) - 1 ) ) {
#  259|               Debug( LDAP_DEBUG_ANY, "lload_get_listener_addresses: "

Error: GCC_ANALYZER_WARNING (CWE-688): [#def161]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:257:14: warning[-Wanalyzer-null-argument]: use of NULL ‘host’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:372:1: enter_function: entry to ‘lload_open_listener’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:395:5: branch_true: following ‘true’ branch (when ‘url’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:396:5: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:396:5: branch_true: following ‘true’ branch (when ‘lud’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:398:5: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:427:8: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:443:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:445:19: call_function: calling ‘lload_get_listener_addresses’ from ‘lload_open_listener’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  255|           sap[1] = NULL;
#  256|   
#  257|->         if ( strlen( host ) >
#  258|                   ( sizeof( ((struct sockaddr_un *)*sap)->sun_path ) - 1 ) ) {
#  259|               Debug( LDAP_DEBUG_ANY, "lload_get_listener_addresses: "

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1976:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**lload_listeners.sl_sd’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1973:18: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1974:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1976:9: danger: ‘**lload_listeners.sl_sd’ leaks here
# 1974|           lload_listeners[i]->sl_mute = 0;
# 1975|           listen( lload_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );
# 1976|->         evconnlistener_enable( lload_listeners[i]->listener );
# 1977|       }
# 1978|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1976:47: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**lload_listeners.sl_sd’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1973:18: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1974:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/lloadd/daemon.c:1976:47: danger: ‘**lload_listeners.sl_sd’ leaks here
# 1974|           lload_listeners[i]->sl_mute = 0;
# 1975|           listen( lload_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );
# 1976|->         evconnlistener_enable( lload_listeners[i]->listener );
# 1977|       }
# 1978|   }

Error: COMPILER_WARNING (CWE-563): [#def164]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/monitor.c: scope_hint: In function ‘lload_monitor_conn_update’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/monitor.c:615:19: warning[-Wunused-variable]: unused variable ‘active’
#  615 |     ldap_pvt_mp_t active, pending, received, completed, failed;
#      |                   ^~~~~~
#  613|       LloadConnection *c = priv;
#  614|       struct berval bv_type, bv_state;
#  615|->     ldap_pvt_mp_t active, pending, received, completed, failed;
#  616|   
#  617|       CONNECTION_LOCK(c);

Error: COMPILER_WARNING (CWE-563): [#def165]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/monitor.c:750:22: warning[-Wunused-variable]: unused variable ‘mp’
#  750 |     monitor_entry_t *mp;
#      |                      ^~
#  748|       struct berval bv_rdn, bv_timestamp, zero = BER_BVC("0"),
#  749|                                           value = BER_BVC("unknown");
#  750|->     monitor_entry_t *mp;
#  751|       monitor_callback_t *cb;
#  752|       Entry *e;

Error: COMPILER_WARNING (CWE-563): [#def166]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/monitor.c: scope_hint: In function ‘lload_monitor_conn_entry_create’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/monitor.c:753:16: warning[-Wunused-variable]: unused variable ‘a’
#  753 |     Attribute *a;
#      |                ^
#  751|       monitor_callback_t *cb;
#  752|       Entry *e;
#  753|->     Attribute *a;
#  754|       BackendInfo *mi = backend_info( "monitor" );
#  755|       monitor_extra_t *mbe = mi->bi_extra;

Error: COMPILER_WARNING (CWE-563): [#def167]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/operation.c: scope_hint: In function ‘operation_unlink’
openldap-2.6.9/openldap-2.6.9/servers/lloadd/operation.c:234:15: warning[-Wunused-variable]: unused variable ‘prev_refcnt’
#  234 |     uintptr_t prev_refcnt;
#      |               ^~~~~~~~~~~
#  232|   {
#  233|       LloadConnection *client, *upstream;
#  234|->     uintptr_t prev_refcnt;
#  235|       int result = 0;
#  236|   

Error: COMPILER_WARNING (CWE-1164): [#def168]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/tier_bestof.c:145:1: warning[-Wunused-function]: ‘bestof_backend_options’ defined but not used
#  145 | bestof_backend_options( LloadTier *tier, LloadBackend *b, char *arg )
#      | ^~~~~~~~~~~~~~~~~~~~~~
#  143|   
#  144|   static int
#  145|-> bestof_backend_options( LloadTier *tier, LloadBackend *b, char *arg )
#  146|   {
#  147|       struct berval weight = BER_BVC("weight=");

Error: COMPILER_WARNING: [#def169]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def170]
openldap-2.6.9/openldap-2.6.9/servers/lloadd/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: lloadd 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def171]
openldap-2.6.9/openldap-2.6.9/servers/slapd/acl.c: scope_hint: In function ‘slap_acl_mask’
openldap-2.6.9/openldap-2.6.9/servers/slapd/acl.c:1157:29: warning[-Wunused-but-set-variable]: variable ‘oldmask’ set but not used
# 1157 |                 slap_mask_t oldmask, modmask;
#      |                             ^~~~~~~
# 1155|   
# 1156|   	for ( ; b != NULL; b = b->a_next, i++ ) {
# 1157|-> 		slap_mask_t oldmask, modmask;
# 1158|   
# 1159|   		ACL_INVALIDATE( modmask );

Error: COMPILER_WARNING: [#def172]
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c: scope_hint: In function ‘regtest’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:173:77: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  173 |                                   "regular expression \"%s\" bad because of %s", pat, error);
#      |                                                                             ^~        ~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  171|   
#  172|   		snprintf( c->cr_msg, sizeof ( c->cr_msg ),
#  173|-> 				  "regular expression \"%s\" bad because of %s", pat, error);
#  174|   		Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );
#  175|   		acl_usage();

Error: COMPILER_WARNING (CWE-563): [#def173]
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:337:13: warning[-Wunused-variable]: unused variable ‘lineno’
#  337 |         int lineno = c->lineno;
#      |             ^~~~~~
#  335|   	Backend *be = c->be;
#  336|   	const char *fname = c->fname;
#  337|-> 	int lineno = c->lineno;
#  338|   	int argc = c->argc;
#  339|   	char **argv = c->argv;

Error: COMPILER_WARNING: [#def174]
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:534:113: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  534 |                                                                       "regular expression \"%s\" bad because of %s",
#      |                                                                                                                 ^~
#  535 |                                                                       right, err );
#      |                                                                              ~~~                                 
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  532|   								regerror( e, &a->acl_attrval_re, err, sizeof( err ) );
#  533|   								snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  534|-> 								      "regular expression \"%s\" bad because of %s",
#  535|   								      right, err );
#  536|   								Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );

Error: COMPILER_WARNING: [#def175]
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:675:97: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  675 |                                                       "regular expression \"%s\" bad because of %s",
#      |                                                                                                 ^~
#  676 |                                                       right, err );
#      |                                                              ~~~                                 
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  673|   						regerror( e, &a->acl_dn_re, err, sizeof( err ) );
#  674|   						snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  675|-> 						      "regular expression \"%s\" bad because of %s",
#  676|   						      right, err );
#  677|   						Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def176]
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:2489:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ptr’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:2775:1: enter_function: entry to ‘print_acl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:2779:9: call_function: calling ‘acl_unparse’ from ‘print_acl’
# 2487|   dnaccess2text( slap_dn_access *bdn, char *ptr, int is_realdn )
# 2488|   {
# 2489|-> 	*ptr++ = ' ';
# 2490|   
# 2491|   	if ( is_realdn ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def177]
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:2768:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ptr’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:2775:1: enter_function: entry to ‘print_acl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/aclparse.c:2779:9: call_function: calling ‘acl_unparse’ from ‘print_acl’
# 2766|   		ptr = access2text( b, ptr );
# 2767|   	}
# 2768|-> 	*ptr = '\0';
# 2769|   	bv->bv_val = aclbuf.bv_val;
# 2770|   	bv->bv_len = ptr - bv->bv_val;

Error: COMPILER_WARNING (CWE-563): [#def178]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/add.c: scope_hint: In function ‘asyncmeta_back_add’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/add.c:245:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  245 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  243|   	a_metaconn_t	*mc;
#  244|   	int		rc, candidate = -1;
#  245|-> 	void *thrctx = op->o_threadctx;
#  246|   	bm_context_t *bc;
#  247|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def179]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/compare.c: scope_hint: In function ‘asyncmeta_back_compare’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/compare.c:187:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  187 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  185|   	a_metaconn_t	*mc;
#  186|   	int		rc, candidate = -1;
#  187|-> 	void *thrctx = op->o_threadctx;
#  188|   	bm_context_t *bc;
#  189|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-665): [#def180]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:100:34: warning[-Wmissing-braces]: missing braces around initializer
#  100 | static ConfigTable a_metacfg[] = {
#      |                                  ^
#   98|   };
#   99|   
#  100|-> static ConfigTable a_metacfg[] = {
#  101|   	{ "uri", "uri", 2, 0, 0,
#  102|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def181]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:601:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2442:22: call_function: calling ‘asyncmeta_suffixm_config’ from ‘asyncmeta_back_cf_gen’
#  599|   	}
#  600|   
#  601|-> 	mt->mt_lsuffixm = pvnc;
#  602|   	mt->mt_rsuffixm = prnc;
#  603|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def182]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:672:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1510:30: call_function: calling ‘asyncmeta_subtree_unparse’ from ‘asyncmeta_back_cf_gen’
#  670|   	struct berval bv, *style;
#  671|   
#  672|-> 	if ( !mt->mt_subtree )
#  673|   		return 1;
#  674|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def183]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:709:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2091:22: call_function: calling ‘asyncmeta_subtree_config’ from ‘asyncmeta_back_cf_gen’
#  707|   
#  708|   	if ( c->type == LDAP_BACK_CFG_SUBTREE_EX ) {
#  709|-> 		if ( mt->mt_subtree && !mt->mt_subtree_exclude ) {
#  710|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  711|   				"\"subtree-exclude\" incompatible with previous \"subtree-include\" directives" );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def184]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:718:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2091:22: call_function: calling ‘asyncmeta_subtree_config’ from ‘asyncmeta_back_cf_gen’
#  716|   
#  717|   	} else {
#  718|-> 		if ( mt->mt_subtree && mt->mt_subtree_exclude ) {
#  719|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  720|   				"\"subtree-include\" incompatible with previous \"subtree-exclude\" directives" );

Error: COMPILER_WARNING: [#def185]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_subtree_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:809:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  809 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
#  810 |                                 pattern, regerr );
#      |                                          ~~~~~~                            
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  807|   
#  808|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  809|-> 				"regular expression \"%s\" bad because of %s",
#  810|   				pattern, regerr );
#  811|   			ch_free( ms );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def186]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1124:53: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1121:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1124:53: danger: dereference of NULL ‘mc’
# 1122|   				mask &= ~LDAP_BACK_F_CANCEL_EXOP;
# 1123|   			}
# 1124|-> 			enum_to_verb( cancel_mode, (mc->mc_flags & mask), &bv );
# 1125|   			if ( BER_BVISNULL( &bv ) ) {
# 1126|   				/* there's something wrong... */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def187]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1136:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1136:40: danger: dereference of NULL ‘mc’
# 1134|   
# 1135|   		case LDAP_BACK_CFG_CHASE:
# 1136|-> 			c->value_int = META_BACK_CMN_CHASE_REFERRALS(mc);
# 1137|   			break;
# 1138|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def188]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1162:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1162:30: danger: dereference of NULL ‘mc’
# 1160|   
# 1161|   		case LDAP_BACK_CFG_NETWORK_TIMEOUT:
# 1162|-> 			if ( mc->mc_network_timeout == 0 ) {
# 1163|   				return 1;
# 1164|   			}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def189]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1172:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1172:40: danger: dereference of NULL ‘mc’
# 1170|   
# 1171|   		case LDAP_BACK_CFG_NOREFS:
# 1172|-> 			c->value_int = META_BACK_CMN_NOREFS(mc);
# 1173|   			break;
# 1174|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def190]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1176:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1176:40: danger: dereference of NULL ‘mc’
# 1174|   
# 1175|   		case LDAP_BACK_CFG_NOUNDEFFILTER:
# 1176|-> 			c->value_int = META_BACK_CMN_NOUNDEFFILTER(mc);
# 1177|   			break;
# 1178|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def191]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1180:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1180:30: danger: dereference of NULL ‘mc’
# 1178|   
# 1179|   		case LDAP_BACK_CFG_NRETRIES:
# 1180|-> 			if ( mc->mc_nretries == META_RETRY_FOREVER ) {
# 1181|   				BER_BVSTR( &bv, "forever" );
# 1182|   			} else if ( mc->mc_nretries == META_RETRY_NEVER ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def192]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1193:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1193:31: danger: dereference of NULL ‘mc’
# 1191|   
# 1192|   		case LDAP_BACK_CFG_QUARANTINE:
# 1193|-> 			if ( !META_BACK_CMN_QUARANTINE( mc )) {
# 1194|   				rc = 1;
# 1195|   				break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def193]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1204:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1204:40: danger: dereference of NULL ‘mc’
# 1202|   
# 1203|   		case LDAP_BACK_CFG_REBIND:
# 1204|-> 			c->value_int = META_BACK_CMN_SAVECRED(mc);
# 1205|   			break;
# 1206|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def194]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1238:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1238:30: danger: dereference of NULL ‘mc’
# 1236|   
# 1237|   		case LDAP_BACK_CFG_VERSION:
# 1238|-> 			if ( mc->mc_version == 0 )
# 1239|   				return 1;
# 1240|   			c->value_int = mc->mc_version;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def195]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1245:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1245:40: danger: dereference of NULL ‘mc’
# 1243|   #ifdef SLAP_CONTROL_X_SESSION_TRACKING
# 1244|   		case LDAP_BACK_CFG_ST_REQUEST:
# 1245|-> 			c->value_int = META_BACK_CMN_ST_REQUEST( mc );
# 1246|   			break;
# 1247|   #endif /* SLAP_CONTROL_X_SESSION_TRACKING */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def196]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1250:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1250:50: danger: dereference of NULL ‘mc’
# 1248|   
# 1249|   		case LDAP_BACK_CFG_T_F:
# 1250|-> 			enum_to_verb( t_f_mode, (mc->mc_flags & LDAP_BACK_F_T_F_MASK2), &bv );
# 1251|   			if ( BER_BVISNULL( &bv ) ) {
# 1252|   				/* there's something wrong... */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def197]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1264:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1264:31: danger: dereference of NULL ‘mc’
# 1262|   			struct berval bc = BER_BVNULL, bv2;
# 1263|   
# 1264|-> 			if (( mc->mc_flags & LDAP_BACK_F_TLS_MASK ) == LDAP_BACK_F_NONE ) {
# 1265|   				rc = 1;
# 1266|   				break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def198]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1290:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1290:49: danger: dereference of NULL ‘mt’
# 1288|   		/* target attrs */
# 1289|   		case LDAP_BACK_CFG_URI: {
# 1290|-> 			char *p2, *p1 = strchr( mt->mt_uri, ' ' );
# 1291|   			bv.bv_len = strlen( mt->mt_uri ) + 3 + mt->mt_psuffix.bv_len;
# 1292|   			bv.bv_val = ch_malloc( bv.bv_len + 1 );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def199]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1316:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1316:30: danger: dereference of NULL ‘mt’
# 1314|   
# 1315|   			bvp = &mt->mt_idassert_authz;
# 1316|-> 			if ( *bvp == NULL ) {
# 1317|   				if ( mt->mt_idassert_flags & LDAP_BACK_AUTH_AUTHZ_ALL )
# 1318|   				{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def200]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1514:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1514:30: danger: dereference of NULL ‘mt’
# 1512|   
# 1513|   		case LDAP_BACK_CFG_FILTER:
# 1514|-> 			if ( mt->mt_filter == NULL ) {
# 1515|   				rc = 1;
# 1516|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def201]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1589:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1589:25: danger: dereference of NULL ‘mc’
# 1587|   
# 1588|   		case LDAP_BACK_CFG_CANCEL:
# 1589|-> 			mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 1590|   			break;
# 1591|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def202]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1593:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1593:25: danger: dereference of NULL ‘mc’
# 1591|   
# 1592|   		case LDAP_BACK_CFG_CHASE:
# 1593|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 1594|   			break;
# 1595|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def203]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1613:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1607:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1613:33: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1613:33: danger: dereference of NULL ‘mc’
# 1611|   				rc = 1;
# 1612|   			} else {
# 1613|-> 				mc->mc_network_timeout = 0;
# 1614|   			}
# 1615|   			break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def204]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1618:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1618:25: danger: dereference of NULL ‘mc’
# 1616|   
# 1617|   		case LDAP_BACK_CFG_NOREFS:
# 1618|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 1619|   			break;
# 1620|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def205]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1622:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1622:25: danger: dereference of NULL ‘mc’
# 1620|   
# 1621|   		case LDAP_BACK_CFG_NOUNDEFFILTER:
# 1622|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 1623|   			break;
# 1624|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def206]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1626:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1626:25: danger: dereference of NULL ‘mc’
# 1624|   
# 1625|   		case LDAP_BACK_CFG_NRETRIES:
# 1626|-> 			mc->mc_nretries = META_RETRY_DEFAULT;
# 1627|   			break;
# 1628|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def207]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1630:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1630:30: danger: dereference of NULL ‘mc’
# 1628|   
# 1629|   		case LDAP_BACK_CFG_QUARANTINE:
# 1630|-> 			if ( META_BACK_CMN_QUARANTINE( mc )) {
# 1631|   				mi->mi_ldap_extra->retry_info_destroy( &mc->mc_quarantine );
# 1632|   				mc->mc_flags &= ~LDAP_BACK_F_QUARANTINE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def208]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1641:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1641:25: danger: dereference of NULL ‘mc’
# 1639|   
# 1640|   		case LDAP_BACK_CFG_REBIND:
# 1641|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 1642|   			break;
# 1643|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def209]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1657:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1651:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1657:33: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1657:33: danger: dereference of NULL ‘mc’
# 1655|   				rc = 1;
# 1656|   			} else {
# 1657|-> 				mc->mc_version = 0;
# 1658|   			}
# 1659|   			break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def210]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1663:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1663:25: danger: dereference of NULL ‘mc’
# 1661|   #ifdef SLAP_CONTROL_X_SESSION_TRACKING
# 1662|   		case LDAP_BACK_CFG_ST_REQUEST:
# 1663|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 1664|   			break;
# 1665|   #endif /* SLAP_CONTROL_X_SESSION_TRACKING */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def211]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1668:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1668:25: danger: dereference of NULL ‘mc’
# 1666|   
# 1667|   		case LDAP_BACK_CFG_T_F:
# 1668|-> 			mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 1669|   			break;
# 1670|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def212]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1672:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1672:25: danger: dereference of NULL ‘mc’
# 1670|   
# 1671|   		case LDAP_BACK_CFG_TLS:
# 1672|-> 			mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 1673|   			if ( mt )
# 1674|   				bindconf_free( &mt->mt_tls );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def213]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1685:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1679:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1685:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1685:38: danger: dereference of NULL ‘mt’
# 1683|   				rc = 1;
# 1684|   			} else {
# 1685|-> 				if ( mt->mt_uri ) {
# 1686|   					ch_free( mt->mt_uri );
# 1687|   					mt->mt_uri = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def214]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1706:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1699:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1705:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1705:36: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1706:46: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1706:46: danger: dereference of NULL ‘mt’
# 1704|   			} else {
# 1705|   				if ( c->valx < 0 ) {
# 1706|-> 					if ( *bvp != NULL ) {
# 1707|   						ber_bvarray_free( *bvp );
# 1708|   						*bvp = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def215]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1712:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1699:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1705:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1705:36: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1712:46: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1712:46: danger: dereference of NULL ‘mt’
# 1710|   
# 1711|   				} else {
# 1712|-> 					if ( *bvp == NULL ) {
# 1713|   						rc = 1;
# 1714|   						break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def216]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1765:71: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1765:71: danger: dereference of NULL ‘mt’
# 1763|   		case LDAP_BACK_CFG_SUBTREE_IN:
# 1764|   			/* can only be one of exclude or include */
# 1765|-> 			if (( c->type == LDAP_BACK_CFG_SUBTREE_EX ) ^ mt->mt_subtree_exclude ) {
# 1766|   				rc = 1;
# 1767|   				break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def217]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1790:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1789:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1790:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1790:33: danger: dereference of NULL ‘mt’
# 1788|   		case LDAP_BACK_CFG_FILTER:
# 1789|   			if ( c->valx < 0 ) {
# 1790|-> 				asyncmeta_filter_destroy( mt->mt_filter );
# 1791|   				mt->mt_filter = NULL;
# 1792|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def218]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1794:67: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1789:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1794:43: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1794:67: danger: dereference of NULL ‘mt’
# 1792|   			} else {
# 1793|   				metafilter_t *mf, **mprev;
# 1794|-> 				for (i=0, mprev = &mt->mt_filter, mf = *mprev; mf; mf = *mprev) {
# 1795|   					if ( i == c->valx ) {
# 1796|   						*mprev = mf->mf_next;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def219]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1916:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘uris’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1884:35: release_memory: ‘uris’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1886:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1893:30: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1914:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1916:34: release_memory: ‘uris’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1916:34: release_memory: ‘uris’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1916:30: danger: dereference of NULL ‘uris + (long unsigned int)j * 8’
# 1914|   		mt = ch_calloc( sizeof( a_metatarget_t ), 1 );
# 1915|   
# 1916|-> 		for ( j = 0; uris[ j ] != NULL; j++ ) {
# 1917|   			char *tmpuri = NULL;
# 1918|   

Error: COMPILER_WARNING: [#def220]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2105:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
# 2105 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
# 2106 |                                 c->argv[1], regerr );
#      |                                             ~~~~~~                         
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 2103|   			regerror( rc, &mf->mf_regex, regerr, sizeof(regerr) );
# 2104|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2105|-> 				"regular expression \"%s\" bad because of %s",
# 2106|   				c->argv[1], regerr );
# 2107|   			ch_free( mf );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def221]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2218:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2211:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2218:42: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2218:17: danger: dereference of NULL ‘mc’
# 2216|   			return 1;
# 2217|   		}
# 2218|-> 		mc->mc_network_timeout = (time_t)t;
# 2219|   		} break;
# 2220|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def222]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2245:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2245:25: danger: dereference of NULL ‘mc’
# 2243|   	/* save bind creds for referral rebinds? */
# 2244|   		if ( c->argc == 1 || c->value_int ) {
# 2245|-> 			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2246|   		} else {
# 2247|   			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def223]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2247:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2244:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2247:25: danger: dereference of NULL ‘mc’
# 2245|   			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2246|   		} else {
# 2247|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 2248|   		}
# 2249|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def224]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2253:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2253:25: danger: dereference of NULL ‘mc’
# 2251|   	case LDAP_BACK_CFG_CHASE:
# 2252|   		if ( c->argc == 1 || c->value_int ) {
# 2253|-> 			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2254|   		} else {
# 2255|   			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def225]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2255:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2252:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2255:25: danger: dereference of NULL ‘mc’
# 2253|   			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2254|   		} else {
# 2255|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 2256|   		}
# 2257|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def226]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2268:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2261:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2268:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2268:17: danger: dereference of NULL ‘mc’
# 2266|   			return 1;
# 2267|   		}
# 2268|-> 		mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 2269|   		mc->mc_flags |= tls_mode[i].mask;
# 2270|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def227]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2296:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2289:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2296:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2296:17: danger: dereference of NULL ‘mc’
# 2294|   			return 1;
# 2295|   		}
# 2296|-> 		mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 2297|   		mc->mc_flags |= t_f_mode[i].mask;
# 2298|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def228]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2359:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2352:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2359:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2359:17: danger: dereference of NULL ‘mc’
# 2357|   			return 1;
# 2358|   		}
# 2359|-> 		mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 2360|   		mc->mc_flags |= cancel_mode[i].mask;
# 2361|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def229]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2406:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2406:22: danger: dereference of NULL ‘mc’
# 2404|   	case LDAP_BACK_CFG_QUARANTINE:
# 2405|   	/* quarantine */
# 2406|-> 		if ( META_BACK_CMN_QUARANTINE( mc ) )
# 2407|   		{
# 2408|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def230]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2434:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2433:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2434:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2434:25: danger: dereference of NULL ‘mc’
# 2432|   	/* session tracking request */
# 2433|   		if ( c->value_int ) {
# 2434|-> 			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2435|   		} else {
# 2436|   			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def231]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2436:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2433:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2436:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2436:25: danger: dereference of NULL ‘mc’
# 2434|   			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2435|   		} else {
# 2436|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 2437|   		}
# 2438|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def232]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2464:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2464:17: danger: dereference of NULL ‘mc’
# 2462|   		}
# 2463|   
# 2464|-> 		mc->mc_nretries = nretries;
# 2465|   		} break;
# 2466|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def233]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2475:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2468:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2475:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2475:17: danger: dereference of NULL ‘mc’
# 2473|   			return 1;
# 2474|   		}
# 2475|-> 		mc->mc_version = c->value_int;
# 2476|   		break;
# 2477|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def234]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2481:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2480:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2481:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2481:25: danger: dereference of NULL ‘mc’
# 2479|   	/* do not return search references */
# 2480|   		if ( c->value_int ) {
# 2481|-> 			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2482|   		} else {
# 2483|   			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2483:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2480:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2483:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2483:25: danger: dereference of NULL ‘mc’
# 2481|   			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2482|   		} else {
# 2483|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 2484|   		}
# 2485|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def236]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2490:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2489:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2490:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2490:25: danger: dereference of NULL ‘mc’
# 2488|   	/* do not propagate undefined search filters */
# 2489|   		if ( c->value_int ) {
# 2490|-> 			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2491|   		} else {
# 2492|   			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def237]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2492:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2489:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2492:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/config.c:2492:25: danger: dereference of NULL ‘mc’
# 2490|   			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2491|   		} else {
# 2492|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 2493|   		}
# 2494|   		break;

Error: COMPILER_WARNING (CWE-563): [#def238]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/delete.c: scope_hint: In function ‘asyncmeta_back_delete’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/delete.c:178:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  178 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  176|   	a_metaconn_t	*mc;
#  177|   	int		rc, candidate = -1;
#  178|-> 	void *thrctx = op->o_threadctx;
#  179|   	bm_context_t *bc;
#  180|   	SlapReply *candidates;

Error: CPPCHECK_WARNING (CWE-457): [#def239]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/dncache.c:105: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  103|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  104|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  105|-> 			( caddr_t )&tmp_entry, asyncmeta_dncache_cmp );
#  106|   
#  107|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def240]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/dncache.c:161: warning[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  159|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  160|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  161|-> 			( caddr_t )&tmp_entry, asyncmeta_dncache_cmp );
#  162|   
#  163|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def241]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/dncache.c:206: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  204|   
#  205|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  206|-> 	entry = ldap_avl_delete( &cache->tree, ( caddr_t )&tmp_entry,
#  207|   			asyncmeta_dncache_cmp );
#  208|   	ldap_pvt_thread_mutex_unlock( &cache->mutex );

Error: COMPILER_WARNING: [#def242]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/meta_result.c:254:39: warning[-Wformat-overflow=]: ‘%s’ directive argument is null
#  254 |                                       "%s meta_send_entry(\"%s\"): " "slap_bv2undef_ad(%s): %s\n",
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  252|   			{
#  253|   				Debug(LDAP_DEBUG_ANY,
#  254|-> 				      "%s meta_send_entry(\"%s\"): " "slap_bv2undef_ad(%s): %s\n",
#  255|   				      op->o_log_prefix, ent.e_name.bv_val,
#  256|   				      mapped.bv_val, text );

Error: COMPILER_WARNING (CWE-563): [#def243]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/modify.c: scope_hint: In function ‘asyncmeta_back_modify’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/modify.c:235:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  235 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  233|   	a_metaconn_t	*mc;
#  234|   	int		rc, candidate = -1;
#  235|-> 	void *thrctx = op->o_threadctx;
#  236|   	bm_context_t *bc;
#  237|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def244]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/modrdn.c: scope_hint: In function ‘asyncmeta_back_modrdn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/modrdn.c:249:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  249 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  247|   	a_metaconn_t	*mc;
#  248|   	int		rc, candidate = -1;
#  249|-> 	void *thrctx = op->o_threadctx;
#  250|   	bm_context_t *bc;
#  251|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def245]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/search.c: scope_hint: In function ‘asyncmeta_back_search’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/search.c:681:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  681 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  679|   	long		i;
#  680|   	SlapReply	*candidates = NULL;
#  681|-> 	void *thrctx = op->o_threadctx;
#  682|   	bm_context_t *bc;
#  683|   	a_metaconn_t *mc;

Error: COMPILER_WARNING: [#def246]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def247]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_asyncmeta 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def248]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:42:19: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:44:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:55:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:55:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:64:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:64:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:76:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:85:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:87:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:93:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: danger: dereference of NULL ‘urls’
#  107|   	}
#  108|   
#  109|-> 	Debug( LDAP_DEBUG_STATS,
#  110|   	    "%s DNSSRV p=%d dn=\"%s\" url=\"%s\"\n",
#  111|   	    op->o_log_prefix, op->o_protocol,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def249]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:114:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:42:19: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:44:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:55:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:55:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:64:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:64:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:76:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:85:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:87:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:93:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:109:9: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:114:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:114:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:114:9: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/referral.c:114:9: danger: dereference of NULL ‘urls’
#  112|   		op->o_req_dn.bv_val, urls[0].bv_val );
#  113|   
#  114|-> 	Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> url=\"%s\"\n",
#  115|   		op->o_req_dn.bv_val, urls[0].bv_val );
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def250]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:45:19: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:48:9: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:50:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:64:23: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:68:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:74:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:74:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:85:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:93:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:95:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:102:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: danger: dereference of NULL ‘urls’
#  117|   	}
#  118|   
#  119|-> 	Debug( LDAP_DEBUG_STATS,
#  120|   	    "%s DNSSRV p=%d dn=\"%s\" url=\"%s\"\n",
#  121|   	    op->o_log_prefix, op->o_protocol,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def251]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:124:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:45:19: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:48:9: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:50:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:64:23: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:68:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:74:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:74:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:85:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:93:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:95:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:102:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:119:9: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:124:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:124:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:124:9: release_memory: ‘urls’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/search.c:124:9: danger: dereference of NULL ‘urls’
#  122|   		op->o_req_dn.bv_len ? op->o_req_dn.bv_val : "", urls[0].bv_val );
#  123|   
#  124|-> 	Debug( LDAP_DEBUG_TRACE,
#  125|   		"DNSSRV: ManageDSAit scope=%d dn=\"%s\" -> url=\"%s\"\n",
#  126|   		op->oq_search.rs_scope,

Error: COMPILER_WARNING: [#def252]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def253]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-dnssrv/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_dnssrv 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-457): [#def254]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/meta_result.c:31: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/meta_result.c: scope_hint: In function ‘asyncmeta_op_handle_result’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/back-ldap.h:111:42: warning[-Wmaybe-uninitialized]: ‘msc’ may be used uninitialized
#  111 | #define LDAP_BACK_CONN_ISSET_F(fp,f)    (*(fp) & (f))
#      |                                          ^~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-asyncmeta/meta_result.c:1486:29: note: ‘msc’ was declared here
# 1486 |         a_metasingleconn_t *msc;
#      |                             ^~~
#  109|   
#  110|   	unsigned		lc_lcflags;
#  111|-> #define LDAP_BACK_CONN_ISSET_F(fp,f)	(*(fp) & (f))
#  112|   #define	LDAP_BACK_CONN_SET_F(fp,f)	(*(fp) |= (f))
#  113|   #define	LDAP_BACK_CONN_CLEAR_F(fp,f)	(*(fp) &= ~(f))

Error: GCC_ANALYZER_WARNING (CWE-457): [#def255]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:853:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘save_o_dn.bv_len’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:1993:1: enter_function: entry to ‘ldap_back_retry’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:1998:9: branch_true: following ‘true’ branch (when ‘lcp’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:1999:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:1999:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2001:9: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2003:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2004:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2020:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2027:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2027:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2034:30: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:2034:30: call_function: calling ‘ldap_back_dobind_int’ from ‘ldap_back_retry’
#  851|   		isproxyauthz = ldap_back_is_proxy_authz( op, rs, sendok, binddn, bindcred );
#  852|   		if ( op->o_tag == LDAP_REQ_BIND ) {
#  853|-> 			op->o_dn = save_o_dn;
#  854|   			op->o_ndn = save_o_ndn;
#  855|   		}

Error: CPPCHECK_WARNING (CWE-562): [#def256]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/bind.c:1369: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1367|   	cb.sc_private = &o_tag;
# 1368|   	cb.sc_response = ldap_back_dobind_cb;
# 1369|-> 	op->o_callback = &cb;
# 1370|   
# 1371|   	if ( LDAP_BACK_CONN_ISIDASSERT( lc ) ) {

Error: CPPCHECK_WARNING (CWE-562): [#def257]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1029: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1027|   	db = *op->o_bd;
# 1028|   	SLAP_DBFLAGS( &db ) &= ~SLAP_DBFLAG_MONITORING;
# 1029|-> 	op->o_bd = &db;
# 1030|   
# 1031|   	text = rs->sr_text;

Error: CPPCHECK_WARNING (CWE-562): [#def258]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1046: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1044|   	sc2.sc_private = &lb;
# 1045|   	sc2.sc_response = ldap_chain_cb_response;
# 1046|-> 	op->o_callback = &sc2;
# 1047|   
# 1048|   	/* Chaining can be performed by a privileged user on behalf

Error: COMPILER_WARNING (CWE-665): [#def259]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1260:33: warning[-Wmissing-braces]: missing braces around initializer
# 1260 | static ConfigTable chaincfg[] = {
#      |                                 ^
# 1258|   #endif
# 1259|   
# 1260|-> static ConfigTable chaincfg[] = {
# 1261|   #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
# 1262|   	{ "chain-chaining", "args",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def260]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2062:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1318:1: enter_function: entry to ‘chain_ldadd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1331:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1332:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1333:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1339:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1341:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1342:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1347:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1349:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1374:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1375:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1375:22: call_function: calling ‘ldap_chain_db_init_common’ from ‘chain_ldadd’
# 2060|   	}
# 2061|   	li = (ldapinfo_t *)be->be_private;
# 2062|-> 	li->li_urllist_f = NULL;
# 2063|   	li->li_urllist_p = NULL;
# 2064|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def261]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2097:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1318:1: enter_function: entry to ‘chain_ldadd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1331:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1332:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1333:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1339:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1341:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1342:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1347:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1349:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1374:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1382:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:1382:14: call_function: calling ‘ldap_chain_db_init_one’ from ‘chain_ldadd’
# 2095|   	}
# 2096|   	li = (ldapinfo_t *)be->be_private;
# 2097|-> 	li->li_urllist_f = NULL;
# 2098|   	li->li_urllist_p = NULL;
# 2099|   

Error: CPPCHECK_WARNING (CWE-457): [#def262]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2179: warning[uninitvar]: Uninitialized variable: rc
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def263]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2179:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2164:17: branch_false: following ‘false’ branch (when ‘edge’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2176:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2179:16: danger: use of uninitialized value ‘rc’ here
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: COMPILER_WARNING (CWE-457): [#def264]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c: scope_hint: In function ‘ldap_chain_connection_destroy’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2179:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
# 2179 |         return rc;
#      |                ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/chain.c:2159:33: note: ‘rc’ was declared here
# 2159 |         int                     rc;
#      |                                 ^~
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: COMPILER_WARNING (CWE-665): [#def265]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:77:32: warning[-Wmissing-braces]: missing braces around initializer
#   77 | static ConfigTable ldapcfg[] = {
#      |                                ^
#   75|   };
#   76|   
#   77|-> static ConfigTable ldapcfg[] = {
#   78|   	{ "uri", "uri", 2, 2, 0,
#   79|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: COMPILER_WARNING (CWE-665): [#def266]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:363:33: warning[-Wmissing-braces]: missing braces around initializer
#  363 | static ConfigTable pbindcfg[] = {
#      |                                 ^
#  361|   };
#  362|   
#  363|-> static ConfigTable pbindcfg[] = {
#  364|   	{ "uri", "uri", 2, 2, 0,
#  365|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: GCC_ANALYZER_WARNING (CWE-465): [#def267]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1688:20: warning[-Wanalyzer-deref-before-check]: check of ‘ch_calloc(8, (long unsigned int)(i + 1))’ for NULL after already dereferencing it
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:945:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1387:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1387:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1555:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1572:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1619:30: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1648:33: branch_true: following ‘true’ branch (when ‘tmpludp’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1653:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1664:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1669:41: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/config.c:1688:20: danger: pointer ‘ch_calloc(8, (long unsigned int)(i + 1))’ is checked for NULL here but it was already dereferenced at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1686|   
# 1687|   done_url:;
# 1688|-> 		if ( urllist ) {
# 1689|   			ldap_charray_free( urllist );
# 1690|   		}

Error: COMPILER_WARNING (CWE-665): [#def268]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:326:37: warning[-Wmissing-braces]: missing braces around initializer
#  326 | static ConfigTable distproc_cfg[] = {
#      |                                     ^
#  324|   static ConfigLDAPadd distproc_ldadd;
#  325|   
#  326|-> static ConfigTable distproc_cfg[] = {
#  327|   	{ "distproc-chaining", "args",
#  328|   		2, 4, 0, ARG_MAGIC|ARG_BERVAL|DP_CHAINING, distproc_cfgen,

Error: COMPILER_WARNING (CWE-563): [#def269]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘distproc_cfadd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:497:49: warning[-Wunused-but-set-variable]: variable ‘lca’ set but not used
#  497 |                 ldap_distproc_cfadd_apply_t     lca = { 0 };
#      |                                                 ^~~
#  495|   
#  496|   	if ( lback->bi_cf_ocs ) {
#  497|-> 		ldap_distproc_cfadd_apply_t	lca = { 0 };
#  498|   
#  499|   		lca.op = op;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def270]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:841:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:362:1: enter_function: entry to ‘distproc_ldadd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:375:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:376:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:375:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:377:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:375:14: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:383:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:385:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:386:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:391:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:393:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:404:21: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:415:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:415:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:419:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:419:22: call_function: calling ‘ldap_distproc_db_init_one’ from ‘distproc_ldadd’
#  839|   
#  840|   	/* copy common data */
#  841|-> 	li->li_nretries = lc->lc_common_li->li_nretries;
#  842|   	li->li_flags = lc->lc_common_li->li_flags;
#  843|   	li->li_version = lc->lc_common_li->li_version;

Error: CPPCHECK_WARNING (CWE-457): [#def271]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:880: warning[uninitvar]: Uninitialized variable: rc
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def272]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:880:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:867:17: branch_false: following ‘false’ branch (when ‘edge’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:877:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:880:16: danger: use of uninitialized value ‘rc’ here
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: COMPILER_WARNING (CWE-457): [#def273]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘ldap_distproc_connection_destroy’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:880:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  880 |         return rc;
#      |                ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/distproc.c:861:33: note: ‘rc’ was declared here
#  861 |         int                     rc;
#      |                                 ^~
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: COMPILER_WARNING (CWE-704): [#def274]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c:245:25: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type
#  243|   		/* copy to tmpmem, doesn't need to be freed */
#  244|   		rs->sr_text = op->o_tmpalloc( strlen( text ) + 1, op->o_tmpmemctx );
#  245|-> 		strcpy( rs->sr_text, text );
#  246|   		ch_free( text );
#  247|   	}

Error: COMPILER_WARNING (CWE-704): [#def275]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c: scope_hint: In function ‘ldap_back_exop_passwd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c:245:27: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type
#  245 |                 strcpy( rs->sr_text, text );
#      |                         ~~^~~~~~~~~
/usr/include/features.h:524: included_from: Included from here.
/usr/include/bits/types.h:26: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/ac/fdset.h:32: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/portable.h:1187: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c:22: included_from: Included from here.
/usr/include/bits/string_fortified.h:77:16: note: expected ‘char *’ but argument is of type ‘const char *’
#   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  243|   		/* copy to tmpmem, doesn't need to be freed */
#  244|   		rs->sr_text = op->o_tmpalloc( strlen( text ) + 1, op->o_tmpmemctx );
#  245|-> 		strcpy( rs->sr_text, text );
#  246|   		ch_free( text );
#  247|   	}

Error: COMPILER_WARNING (CWE-704): [#def276]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c:372:25: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type
#  370|   		/* copy to tmpmem, doesn't need to be freed */
#  371|   		rs->sr_text = op->o_tmpalloc( strlen( text ) + 1, op->o_tmpmemctx );
#  372|-> 		strcpy( rs->sr_text, text );
#  373|   		ch_free( text );
#  374|   	}

Error: COMPILER_WARNING (CWE-704): [#def277]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c: scope_hint: In function ‘ldap_back_exop_generic’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/extended.c:372:27: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type
#  372 |                 strcpy( rs->sr_text, text );
#      |                         ~~^~~~~~~~~
/usr/include/bits/string_fortified.h:77:16: note: expected ‘char *’ but argument is of type ‘const char *’
#   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  370|   		/* copy to tmpmem, doesn't need to be freed */
#  371|   		rs->sr_text = op->o_tmpalloc( strlen( text ) + 1, op->o_tmpmemctx );
#  372|-> 		strcpy( rs->sr_text, text );
#  373|   		ch_free( text );
#  374|   	}

Error: COMPILER_WARNING (CWE-563): [#def278]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/monitor.c: scope_hint: In function ‘ldap_back_monitor_db_close’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/monitor.c:1040:42: warning[-Wunused-but-set-variable]: variable ‘mbe’ set but not used
# 1040 |                 monitor_extra_t         *mbe;
#      |                                          ^~~
# 1038|   	if ( li && !BER_BVISNULL( &li->li_monitor_info.lmi_ndn ) ) {
# 1039|   		BackendInfo		*mi;
# 1040|-> 		monitor_extra_t		*mbe;
# 1041|   
# 1042|   		/* check if monitor is configured and usable */

Error: COMPILER_WARNING: [#def279]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def280]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldap/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_ldap 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def281]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldif/ldif.c:166:32: warning[-Wmissing-braces]: missing braces around initializer
#  166 | static ConfigTable ldifcfg[] = {
#      |                                ^
#  164|   
#  165|   
#  166|-> static ConfigTable ldifcfg[] = {
#  167|   	{ "directory", "dir", 2, 2, 0, ARG_BERVAL|ARG_OFFSET,
#  168|   		(void *)offsetof(struct ldif_info, li_base_path),

Error: CPPCHECK_WARNING (CWE-562): [#def282]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldif/ldif.c:1457: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1455|    send_res:
# 1456|   	rs->sr_err = rc;
# 1457|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1458|   	Debug( LDAP_DEBUG_TRACE, "ldif_back_add: err: %d text: %s\n",
# 1459|   		rc, rs->sr_text ? rs->sr_text : "" );

Error: CPPCHECK_WARNING (CWE-562): [#def283]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldif/ldif.c:1542: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1540|   
# 1541|   	rs->sr_err = rc;
# 1542|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1543|   	send_ldap_result( op, rs );
# 1544|   	slap_graduate_commit_csn( op );

Error: CPPCHECK_WARNING (CWE-562): [#def284]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldif/ldif.c:1646: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1644|   	ldap_pvt_thread_mutex_unlock( &li->li_modop_mutex );
# 1645|   	rs->sr_err = rc;
# 1646|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1647|   	send_ldap_result( op, rs );
# 1648|   	slap_graduate_commit_csn( op );

Error: COMPILER_WARNING: [#def285]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldif/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def286]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-ldif/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_ldif 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:167:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:157:5: enter_function: entry to ‘mdb_midl_append’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:161:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:162:21: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:162:21: call_function: calling ‘mdb_midl_grow’ from ‘mdb_midl_append’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:162:21: return_function: returning to ‘mdb_midl_append’ from ‘mdb_midl_grow’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:162:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:164:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:167:9: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  165|   	}
#  166|   	ids[0]++;
#  167|-> 	ids[ids[0]] = id;
#  168|   	return 0;
#  169|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:181:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:171:5: enter_function: entry to ‘mdb_midl_append_list’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:175:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:176:21: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:176:21: call_function: calling ‘mdb_midl_grow’ from ‘mdb_midl_append_list’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:176:21: return_function: returning to ‘mdb_midl_append_list’ from ‘mdb_midl_grow’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:176:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:178:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:181:9: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  179|   	}
#  180|   	memcpy(&ids[ids[0]+1], &app[1], app[0] * sizeof(MDB_ID));
#  181|-> 	ids[0] += app[0];
#  182|   	return 0;
#  183|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:196:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:185:5: enter_function: entry to ‘mdb_midl_append_range’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:189:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:190:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:190:21: call_function: calling ‘mdb_midl_grow’ from ‘mdb_midl_append_range’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:190:21: return_function: returning to ‘mdb_midl_append_range’ from ‘mdb_midl_grow’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:190:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:192:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:196:16: branch_true: following ‘true’ branch (when ‘n != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:197:28: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:196:16: branch_true: following ‘true’ branch (when ‘n != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:197:28: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/./../../../libraries/liblmdb/midl.c:196:16: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  194|   	ids[0] = len + n;
#  195|   	ids += len;
#  196|-> 	while (n)
#  197|   		ids[n--] = id++;
#  198|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def290]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:73:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘x’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:190:1: enter_function: entry to ‘mdb_attr_index_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:206:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:213:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:213:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:226:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:252:11: branch_false: following ‘false’ branch (when ‘mask != 0’)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:264:22: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:273:21: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:273:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:301:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:304:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:321:27: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:321:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:428:22: call_function: calling ‘ainfo_insert’ from ‘mdb_attr_index_config’
#   71|   	mdb->mi_attrs = ch_realloc( mdb->mi_attrs, ( mdb->mi_nattrs+1 ) * 
#   72|   		sizeof( AttrInfo * ));
#   73|-> 	if ( x < mdb->mi_nattrs )
#   74|   		AC_MEMCPY( &mdb->mi_attrs[x+1], &mdb->mi_attrs[x],
#   75|   			( mdb->mi_nattrs - x ) * sizeof( AttrInfo *));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def291]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:432:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:190:1: enter_function: entry to ‘mdb_attr_index_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:206:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:213:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:213:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:214:27: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:216:19: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:235:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:248:30: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:252:11: branch_false: following ‘false’ branch (when ‘mask != 0’)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:264:22: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:273:21: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:273:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:301:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:304:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:321:27: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:321:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:428:22: call_function: calling ‘ainfo_insert’ from ‘mdb_attr_index_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:428:22: return_function: returning to ‘mdb_attr_index_config’ from ‘ainfo_insert’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:429:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:430:39: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:430:39: call_function: calling ‘mdb_attr_mask’ from ‘mdb_attr_index_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:430:39: return_function: returning to ‘mdb_attr_index_config’ from ‘mdb_attr_mask’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:432:33: danger: dereference of NULL ‘mdb_attr_mask(mdb,  ad)’
#  430|   			AttrInfo *b = mdb_attr_mask( mdb, ad );
#  431|   			/* If this is just a multival record, reuse it for index info */
#  432|-> 			if ( !( b->ai_indexmask || b->ai_newmask ) && b->ai_multi_lo < UINT_MAX ) {
#  433|   				b->ai_indexmask = a->ai_indexmask;
#  434|   				b->ai_newmask = a->ai_newmask;

Error: COMPILER_WARNING (CWE-1164): [#def292]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘mdb_attr_multi_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:581:1: warning[-Wunused-label]: label ‘fail’ defined but not used
#  581 | fail:
#      | ^~~~
#  579|   					fname, lineno, c_reply->msg );
#  580|   			}
#  581|-> fail:
#  582|   			goto done;
#  583|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def293]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:595:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:518:1: enter_function: entry to ‘mdb_attr_multi_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:533:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:540:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:541:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:545:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:548:12: branch_false: following ‘false’ branch (when ‘hi >= lo’)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:557:22: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:562:21: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:562:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:568:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:571:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:585:34: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:591:22: call_function: calling ‘ainfo_insert’ from ‘mdb_attr_multi_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:591:22: return_function: returning to ‘mdb_attr_multi_config’ from ‘ainfo_insert’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:592:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:593:39: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:593:39: call_function: calling ‘mdb_attr_mask’ from ‘mdb_attr_multi_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:593:39: return_function: returning to ‘mdb_attr_multi_config’ from ‘mdb_attr_mask’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:595:30: danger: dereference of NULL ‘mdb_attr_mask(mdb,  ad)’
#  593|   			AttrInfo *b = mdb_attr_mask( mdb, ad );
#  594|   			/* If this is just an index record, reuse it for multival info */
#  595|-> 			if ( b->ai_multi_lo == UINT_MAX ) {
#  596|   				b->ai_multi_hi = a->ai_multi_hi;
#  597|   				b->ai_multi_lo = a->ai_multi_lo;

Error: COMPILER_WARNING (CWE-1164): [#def294]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘mdb_ad_read’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/attr.c:778:1: warning[-Wunused-label]: label ‘done’ defined but not used
#  778 | done:
#      | ^~~~
#  776|   	mdb->mi_numads = i-1;
#  777|   
#  778|-> done:
#  779|   	if ( rc == MDB_NOTFOUND )
#  780|   		rc = 0;

Error: COMPILER_WARNING (CWE-665): [#def295]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/config.c:50:31: warning[-Wmissing-braces]: missing braces around initializer
#   50 | static ConfigTable mdbcfg[] = {
#      |                               ^
#   48|   };
#   49|   
#   50|-> static ConfigTable mdbcfg[] = {
#   51|   	{ "idlexp", "log", 2, 2, 0, ARG_UINT|ARG_MAGIC|MDB_IDLEXP,
#   52|   		mdb_bk_cfg, "( OLcfgBkAt:12.1 NAME 'olcBkMdbIdlExp' "

Error: CPPCHECK_WARNING (CWE-562): [#def296]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/config.c:412: error[invalidLifetime]: Using object that points to local variable 'mask' that is out of scope.
#  410|   		ID id = 0;
#  411|   		s = 0;			/* key 0 records next entryID to index */
#  412|-> 		data.mv_size = sizeof( ID );
#  413|   		data.mv_data = &id;
#  414|   		rc = mdb_cursor_put( curs, &key, &data, 0 );

Error: COMPILER_WARNING: [#def297]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/config.c: scope_hint: In function ‘mdb_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/config.c:883:68: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 4123 bytes into a region of size 256
#  883 |                         snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: invalid path: %s",
#      |                                                                    ^~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 17 and 4267 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  881|   			char ebuf[128];
#  882|   			int saved_errno = errno;
#  883|-> 			snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: invalid path: %s",
#  884|   				c->log, AC_STRERROR_R( saved_errno, ebuf, sizeof(ebuf) ) );
#  885|   			Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg );

Error: COMPILER_WARNING: [#def298]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c: scope_hint: In function ‘mdb_dn2id’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:315:33: warning[-Wdangling-pointer=]: storing the address of local variable ‘dn’ in ‘matched_134(D)->bv_val’
#  315 |                 *matched->bv_val-- = '\0';
#      |                  ~~~~~~~~~~~~~~~^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:306:14: note: ‘dn’ declared here
#  306 |         char dn[SLAP_LDAPDN_MAXLEN];
#      |              ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:296:26: note: ‘matched’ declared here
#  296 |         struct berval   *matched,
#      |         ~~~~~~~~~~~~~~~~~^~~~~~~
#  313|   		matched->bv_val = dn + sizeof(dn) - 1;
#  314|   		matched->bv_len = 0;
#  315|-> 		*matched->bv_val-- = '\0';
#  316|   	}
#  317|   	if ( nmatched ) {

Error: COMPILER_WARNING (CWE-563): [#def299]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:563:29: warning[-Wunused-but-set-variable]: variable ‘len’ set but not used
#  563 |         int             rc, len, nlen;
#      |                             ^~~
#  561|   	MDB_val		key, data;
#  562|   	MDB_cursor	*cursor;
#  563|-> 	int		rc, len, nlen;
#  564|   	char dn[SLAP_LDAPDN_MAXLEN], ndn[SLAP_LDAPDN_MAXLEN], *ptr;
#  565|   	char *dptr, *nptr;

Error: COMPILER_WARNING (CWE-563): [#def300]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c: scope_hint: In function ‘mdb_id2name’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:563:34: warning[-Wunused-but-set-variable]: variable ‘nlen’ set but not used
#  563 |         int             rc, len, nlen;
#      |                                  ^~~~
#  561|   	MDB_val		key, data;
#  562|   	MDB_cursor	*cursor;
#  563|-> 	int		rc, len, nlen;
#  564|   	char dn[SLAP_LDAPDN_MAXLEN], ndn[SLAP_LDAPDN_MAXLEN], *ptr;
#  565|   	char *dptr, *nptr;

Error: CPPCHECK_WARNING (CWE-457): [#def301]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:609: error[uninitvar]: Uninitialized variable: dn
#  607|   		name->bv_val = op->o_tmpalloc( name->bv_len + 1, op->o_tmpmemctx );
#  608|   		nname->bv_val = op->o_tmpalloc( nname->bv_len + 1, op->o_tmpmemctx );
#  609|-> 		memcpy( name->bv_val, dn, name->bv_len );
#  610|   		name->bv_val[name->bv_len] = '\0';
#  611|   		memcpy( nname->bv_val, ndn, nname->bv_len );

Error: CPPCHECK_WARNING (CWE-457): [#def302]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/dn2id.c:611: error[uninitvar]: Uninitialized variable: ndn
#  609|   		memcpy( name->bv_val, dn, name->bv_len );
#  610|   		name->bv_val[name->bv_len] = '\0';
#  611|-> 		memcpy( nname->bv_val, ndn, nname->bv_len );
#  612|   		nname->bv_val[nname->bv_len] = '\0';
#  613|   	}

Error: COMPILER_WARNING (CWE-563): [#def303]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/filterindex.c: scope_hint: In function ‘ext_candidates’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/filterindex.c:525:29: warning[-Wunused-but-set-variable]: variable ‘scope’ set but not used
#  525 |                         int scope;
#      |                             ^~~~~
#  523|   			dnRelativeMatch && dnIsSuffix( &mra->ma_value,
#  524|   				op->o_bd->be_nsuffix )) {
#  525|-> 			int scope;
#  526|   			if ( mra->ma_rule == slap_schema.si_mr_dnSuperiorMatch ) {
#  527|   				mdb_dn2sups( op, rtxn, &mra->ma_value, ids );

Error: COMPILER_WARNING (CWE-563): [#def304]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_id2v_compare’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:50:13: warning[-Wunused-variable]: unused variable ‘rc’
#   50 |         int rc;
#      |             ^~
#   48|   	unsigned short *uv, *cv;
#   49|   	ID ui, ci;
#   50|-> 	int rc;
#   51|   
#   52|   	memcpy(&ui, usrkey->mv_data, sizeof(ID));

Error: COMPILER_WARNING (CWE-563): [#def305]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:75:13: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#   75 |         int rc, match, olen;
#      |             ^~
#   73|   	AttributeDescription *ad = usrkey[2].mv_data;
#   74|   	struct berval bv1, bv2;
#   75|-> 	int rc, match, olen;
#   76|   	unsigned short s;
#   77|   	char *ptr;

Error: COMPILER_WARNING (CWE-563): [#def306]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_id2v_dupsort’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:75:24: warning[-Wunused-variable]: unused variable ‘olen’
#   75 |         int rc, match, olen;
#      |                        ^~~~
#   73|   	AttributeDescription *ad = usrkey[2].mv_data;
#   74|   	struct berval bv1, bv2;
#   75|-> 	int rc, match, olen;
#   76|   	unsigned short s;
#   77|   	char *ptr;

Error: COMPILER_WARNING (CWE-563): [#def307]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_mval_del’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:166:15: warning[-Wunused-variable]: unused variable ‘ptr’
#  166 |         char *ptr;
#      |               ^~~
#  164|   	struct mdb_info *mdb = (struct mdb_info *) op->o_bd->be_private;
#  165|   	MDB_val key, data[3];
#  166|-> 	char *ptr;
#  167|   	char ivk[ID2VKSZ];
#  168|   	unsigned i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def308]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1059:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘a’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1035:5: enter_function: entry to ‘mdb_entry_decode’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1053:13: call_function: calling ‘mdb_entry_alloc’ from ‘mdb_entry_decode’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1053:13: return_function: returning to ‘mdb_entry_decode’ from ‘mdb_entry_alloc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1055:12: branch_false: following ‘false’ branch (when ‘nvals != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1058:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1058:9: release_memory: ‘a’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/id2entry.c:1059:9: danger: dereference of NULL ‘a’
# 1057|   	}
# 1058|   	a = x->e_attrs;
# 1059|-> 	bptr = a->a_vals;
# 1060|   	i = *lp++;
# 1061|   	ptr = (unsigned char *)(lp + i);

Error: COMPILER_WARNING (CWE-1164): [#def309]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/idl.c:206:12: warning[-Wunused-function]: ‘mdb_idl_delete’ defined but not used
#  206 | static int mdb_idl_delete( ID *ids, ID id )
#      |            ^~~~~~~~~~~~~~
#  204|   }
#  205|   
#  206|-> static int mdb_idl_delete( ID *ids, ID id )
#  207|   {
#  208|   	unsigned x;

Error: COMPILER_WARNING (CWE-563): [#def310]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/index.c: scope_hint: In function ‘mdb_index_param’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/index.c:84:27: warning[-Wunused-but-set-variable]: variable ‘type’ set but not used
#   84 |         slap_mask_t mask, type = 0;
#      |                           ^~~~
#   82|   {
#   83|   	AttrInfo *ai;
#   84|-> 	slap_mask_t mask, type = 0;
#   85|   
#   86|   	ai = mdb_index_mask( be, desc, prefixp );

Error: COMPILER_WARNING (CWE-563): [#def311]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/index.c: scope_hint: In function ‘indexer’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/index.c:179:15: warning[-Wunused-but-set-variable]: variable ‘err’ set but not used
#  179 |         char *err;
#      |               ^~~
#  177|   	MDB_cursor *mc = ai->ai_cursor;
#  178|   	mdb_idl_keyfunc *keyfunc;
#  179|-> 	char *err;
#  180|   
#  181|   	assert( mask != 0 );

Error: COMPILER_WARNING (CWE-563): [#def312]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/modrdn.c: scope_hint: In function ‘mdb_modrdn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/modrdn.c:44:26: warning[-Wunused-but-set-variable]: variable ‘new_parent_dn’ set but not used
#   44 |         struct berval   *new_parent_dn = NULL;  /* np_dn, p_dn, or NULL */
#      |                          ^~~~~~~~~~~~~
#   42|   	struct berval	*np_dn = NULL;			/* newSuperior dn */
#   43|   	struct berval	*np_ndn = NULL;			/* newSuperior ndn */
#   44|-> 	struct berval	*new_parent_dn = NULL;	/* np_dn, p_dn, or NULL */
#   45|   
#   46|   	int		manageDSAit = get_manageDSAit( op );

Error: COMPILER_WARNING (CWE-563): [#def313]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/monitor.c: scope_hint: In function ‘mdb_monitor_free’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/monitor.c:275:28: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  275 |         int             i, rc;
#      |                            ^~
#  273|   	char		textbuf[ SLAP_TEXT_BUFLEN ];
#  274|   
#  275|-> 	int		i, rc;
#  276|   
#  277|   	/* NOTE: if slap_shutdown != 0, priv might have already been freed */

Error: COMPILER_WARNING (CWE-252): [#def314]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/monitor.c: scope_hint: In function ‘mdb_monitor_db_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/monitor.c:487:25: warning[-Wunused-result]: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’
#  487 |                         getcwd( path, sizeof( path ) );
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  485|   		if ( fname[ 0 ] != '/' ) {
#  486|   			/* get full path name */
#  487|-> 			getcwd( path, sizeof( path ) );
#  488|   			pathlen = strlen( path );
#  489|   

Error: COMPILER_WARNING (CWE-563): [#def315]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/search.c: scope_hint: In function ‘mdb_search’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/search.c:430:26: warning[-Wunused-but-set-variable]: variable ‘attrs’ set but not used
#  430 |         AttributeName   *attrs;
#      |                          ^~~~~
#  428|   	Entry		*e = NULL, *base = NULL;
#  429|   	Entry		*matched = NULL;
#  430|-> 	AttributeName	*attrs;
#  431|   	slap_mask_t	mask;
#  432|   	time_t		stoptime;

Error: COMPILER_WARNING (CWE-457): [#def316]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/search.c:1180:51: warning[-Wmaybe-uninitialized]: ‘cscope’ may be used uninitialized
# 1180 |                                 while (iscopes[0] && cscope < iscopes[0]) {
#      |                                        ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/search.c:423:51: note: ‘cscope’ was declared here
#  423 |         ID              id, cursor, nsubs, ncand, cscope;
#      |                                                   ^~~~~~
# 1178|   				 * alias scopes left, search them too.
# 1179|   				 */
# 1180|-> 				while (iscopes[0] && cscope < iscopes[0]) {
# 1181|   					cscope++;
# 1182|   					isc.id = iscopes[cscope];

Error: COMPILER_WARNING (CWE-1164): [#def317]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/tools.c:1253:1: warning[-Wunused-function]: ‘mdb_tool_index_task’ defined but not used
# 1253 | mdb_tool_index_task( void *ctx, void *ptr )
#      | ^~~~~~~~~~~~~~~~~~~
# 1251|   
# 1252|   static void *
# 1253|-> mdb_tool_index_task( void *ctx, void *ptr )
# 1254|   {
# 1255|   	int base = *(int *)ptr;

Error: COMPILER_WARNING: [#def318]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def319]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-mdb/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_mdb 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def320]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:110:32: warning[-Wmissing-braces]: missing braces around initializer
#  110 | static ConfigTable metacfg[] = {
#      |                                ^
#  108|   };
#  109|   
#  110|-> static ConfigTable metacfg[] = {
#  111|   	{ "uri", "uri", 2, 0, 0,
#  112|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def321]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:733:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1089:1: enter_function: entry to ‘meta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1582:30: call_function: calling ‘meta_subtree_unparse’ from ‘meta_back_cf_gen’
#  731|   	struct berval bv, *style;
#  732|   
#  733|-> 	if ( !mt->mt_subtree )
#  734|   		return 1;
#  735|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def322]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:770:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1089:1: enter_function: entry to ‘meta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1940:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2157:22: call_function: calling ‘meta_subtree_config’ from ‘meta_back_cf_gen’
#  768|   
#  769|   	if ( c->type == LDAP_BACK_CFG_SUBTREE_EX ) {
#  770|-> 		if ( mt->mt_subtree && !mt->mt_subtree_exclude ) {
#  771|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  772|   				"\"subtree-exclude\" incompatible with previous \"subtree-include\" directives" );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def323]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:779:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1089:1: enter_function: entry to ‘meta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1940:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2157:22: call_function: calling ‘meta_subtree_config’ from ‘meta_back_cf_gen’
#  777|   
#  778|   	} else {
#  779|-> 		if ( mt->mt_subtree && mt->mt_subtree_exclude ) {
#  780|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  781|   				"\"subtree-include\" incompatible with previous \"subtree-exclude\" directives" );

Error: COMPILER_WARNING: [#def324]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_subtree_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:870:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  870 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
#  871 |                                 pattern, regerr );
#      |                                          ~~~~~~                            
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  868|   
#  869|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  870|-> 				"regular expression \"%s\" bad because of %s",
#  871|   				pattern, regerr );
#  872|   			ch_free( ms );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def325]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1364:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1364:49: danger: dereference of NULL ‘mt’
# 1362|   		/* target attrs */
# 1363|   		case LDAP_BACK_CFG_URI: {
# 1364|-> 			char *p2, *p1 = strchr( mt->mt_uri, ' ' );
# 1365|   			bv.bv_len = strlen( mt->mt_uri ) + 3 + mt->mt_psuffix.bv_len;
# 1366|   			bv.bv_val = ch_malloc( bv.bv_len + 1 );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def326]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1390:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1390:30: danger: dereference of NULL ‘mt’
# 1388|   
# 1389|   			bvp = &mt->mt_idassert_authz;
# 1390|-> 			if ( *bvp == NULL ) {
# 1391|   				if ( mt->mt_idassert_flags & LDAP_BACK_AUTH_AUTHZ_ALL )
# 1392|   				{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def327]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1586:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1586:30: danger: dereference of NULL ‘mt’
# 1584|   
# 1585|   		case LDAP_BACK_CFG_FILTER:
# 1586|-> 			if ( mt->mt_filter == NULL ) {
# 1587|   				rc = 1;
# 1588|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def328]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1738:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1738:30: danger: dereference of NULL ‘mt’
# 1736|   		/* target attrs */
# 1737|   		case LDAP_BACK_CFG_URI:
# 1738|-> 			if ( mt->mt_uri ) {
# 1739|   				ch_free( mt->mt_uri );
# 1740|   				mt->mt_uri = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def329]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1752:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1751:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1752:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1752:38: danger: dereference of NULL ‘mt’
# 1750|   			bvp = &mt->mt_idassert_authz;
# 1751|   			if ( c->valx < 0 ) {
# 1752|-> 				if ( *bvp != NULL ) {
# 1753|   					ber_bvarray_free( *bvp );
# 1754|   					*bvp = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def330]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1758:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1751:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1758:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1758:38: danger: dereference of NULL ‘mt’
# 1756|   
# 1757|   			} else {
# 1758|-> 				if ( *bvp == NULL ) {
# 1759|   					rc = 1;
# 1760|   					break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def331]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1857:71: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1857:71: danger: dereference of NULL ‘mt’
# 1855|   		case LDAP_BACK_CFG_SUBTREE_IN:
# 1856|   			/* can only be one of exclude or include */
# 1857|-> 			if (( c->type == LDAP_BACK_CFG_SUBTREE_EX ) ^ mt->mt_subtree_exclude ) {
# 1858|   				rc = 1;
# 1859|   				break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def332]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1882:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1881:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1882:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1882:33: danger: dereference of NULL ‘mt’
# 1880|   		case LDAP_BACK_CFG_FILTER:
# 1881|   			if ( c->valx < 0 ) {
# 1882|-> 				meta_filter_destroy( mt->mt_filter );
# 1883|   				mt->mt_filter = NULL;
# 1884|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def333]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1886:67: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1886:43: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1886:67: danger: dereference of NULL ‘mt’
# 1884|   			} else {
# 1885|   				metafilter_t *mf, **mprev;
# 1886|-> 				for (i=0, mprev = &mt->mt_filter, mf = *mprev; mf; mf = *mprev) {
# 1887|   					if ( i == c->valx ) {
# 1888|   						*mprev = mf->mf_next;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def334]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2157:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1919:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1919:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2157:22: danger: use of uninitialized value ‘mt’ here
# 2155|   	case LDAP_BACK_CFG_SUBTREE_IN:
# 2156|   	/* subtree-exclude */
# 2157|-> 		if ( meta_subtree_config( mt, c )) {
# 2158|   			Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );
# 2159|   			return 1;

Error: COMPILER_WARNING: [#def335]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2171:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
# 2171 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
# 2172 |                                 c->argv[1], regerr );
#      |                                             ~~~~~~                         
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 2169|   			regerror( rc, &mf->mf_regex, regerr, sizeof(regerr) );
# 2170|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2171|-> 				"regular expression \"%s\" bad because of %s",
# 2172|   				c->argv[1], regerr );
# 2173|   			ch_free( mf );

Error: COMPILER_WARNING (CWE-457): [#def336]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2177:26: warning[-Wmaybe-uninitialized]: ‘mt’ may be used uninitialized
# 2177 |                 for ( m2 = &mt->mt_filter; *m2; m2 = &(*m2)->mf_next )
#      |                       ~~~^~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1092:26: note: ‘mt’ was declared here
# 1092 |         metatarget_t    *mt;
#      |                          ^~
# 2175|   		}
# 2176|   		ber_str2bv( c->argv[1], 0, 1, &mf->mf_regex_pattern );
# 2177|-> 		for ( m2 = &mt->mt_filter; *m2; m2 = &(*m2)->mf_next )
# 2178|   			;
# 2179|   		*m2 = mf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def337]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2255:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2248:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2255:42: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2255:17: danger: dereference of NULL ‘mc’
# 2253|   			return 1;
# 2254|   		}
# 2255|-> 		mc->mc_network_timeout = (time_t)t;
# 2256|   		} break;
# 2257|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def338]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2297:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2297:25: danger: dereference of NULL ‘mc’
# 2295|   	/* save bind creds for referral rebinds? */
# 2296|   		if ( c->argc == 1 || c->value_int ) {
# 2297|-> 			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2298|   		} else {
# 2299|   			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def339]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2299:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2296:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2299:25: danger: dereference of NULL ‘mc’
# 2297|   			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2298|   		} else {
# 2299|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 2300|   		}
# 2301|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def340]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2305:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2305:25: danger: dereference of NULL ‘mc’
# 2303|   	case LDAP_BACK_CFG_CHASE:
# 2304|   		if ( c->argc == 1 || c->value_int ) {
# 2305|-> 			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2306|   		} else {
# 2307|   			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def341]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2307:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2304:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2307:25: danger: dereference of NULL ‘mc’
# 2305|   			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2306|   		} else {
# 2307|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 2308|   		}
# 2309|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def342]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2320:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2313:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2320:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2320:17: danger: dereference of NULL ‘mc’
# 2318|   			return 1;
# 2319|   		}
# 2320|-> 		mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 2321|   		mc->mc_flags |= tls_mode[i].mask;
# 2322|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def343]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2348:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2341:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2348:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2348:17: danger: dereference of NULL ‘mc’
# 2346|   			return 1;
# 2347|   		}
# 2348|-> 		mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 2349|   		mc->mc_flags |= t_f_mode[i].mask;
# 2350|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def344]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2443:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2436:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2443:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2443:17: danger: dereference of NULL ‘mc’
# 2441|   			return 1;
# 2442|   		}
# 2443|-> 		mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 2444|   		mc->mc_flags |= cancel_mode[i].mask;
# 2445|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def345]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2595:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2595:22: danger: dereference of NULL ‘mc’
# 2593|   	case LDAP_BACK_CFG_QUARANTINE:
# 2594|   	/* quarantine */
# 2595|-> 		if ( META_BACK_CMN_QUARANTINE( mc ) )
# 2596|   		{
# 2597|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def346]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2623:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2622:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2623:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2623:25: danger: dereference of NULL ‘mc’
# 2621|   	/* session tracking request */
# 2622|   		if ( c->value_int ) {
# 2623|-> 			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2624|   		} else {
# 2625|   			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def347]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2625:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2622:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2625:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2625:25: danger: dereference of NULL ‘mc’
# 2623|   			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2624|   		} else {
# 2625|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 2626|   		}
# 2627|   		break;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def348]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2638:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mt’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1919:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1919:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2638:22: danger: use of uninitialized value ‘mt’ here
# 2636|   		int cnt = 0, argc, ix = c->valx;
# 2637|   
# 2638|-> 		if ( mt->mt_rwmap.rwm_bva_rewrite ) {
# 2639|   			for ( ; !BER_BVISNULL( &mt->mt_rwmap.rwm_bva_rewrite[ cnt ] ); cnt++ )
# 2640|   				/* count */ ;

Error: COMPILER_WARNING (CWE-457): [#def349]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2692:35: warning[-Wmaybe-uninitialized]: ‘i’ may be used uninitialized
# 2692 |                         for ( ; i < cnt; i++ ) {
#      |                                 ~~^~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1095:13: note: ‘i’ was declared here
# 1095 |         int i, rc = 0;
#      |             ^
# 2690|   		}
# 2691|   		if ( ix < cnt ) {
# 2692|-> 			for ( ; i < cnt; i++ ) {
# 2693|   				ca.line = mt->mt_rwmap.rwm_bva_rewrite[ i ].bv_val;
# 2694|   				ca.argc = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def350]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2871:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2871:17: danger: dereference of NULL ‘mc’
# 2869|   		}
# 2870|   
# 2871|-> 		mc->mc_nretries = nretries;
# 2872|   		} break;
# 2873|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def351]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2882:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2875:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2882:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2882:17: danger: dereference of NULL ‘mc’
# 2880|   			return 1;
# 2881|   		}
# 2882|-> 		mc->mc_version = c->value_int;
# 2883|   		break;
# 2884|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def352]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2888:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2887:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2888:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2888:25: danger: dereference of NULL ‘mc’
# 2886|   	/* do not return search references */
# 2887|   		if ( c->value_int ) {
# 2888|-> 			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2889|   		} else {
# 2890|   			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def353]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2890:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2887:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2890:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2890:25: danger: dereference of NULL ‘mc’
# 2888|   			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2889|   		} else {
# 2890|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 2891|   		}
# 2892|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def354]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2897:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2896:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2897:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2897:25: danger: dereference of NULL ‘mc’
# 2895|   	/* do not propagate undefined search filters */
# 2896|   		if ( c->value_int ) {
# 2897|-> 			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2898|   		} else {
# 2899|   			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def355]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2899:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2896:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2899:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2899:25: danger: dereference of NULL ‘mc’
# 2897|   			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2898|   		} else {
# 2899|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 2900|   		}
# 2901|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def356]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2906:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2905:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2906:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2906:25: danger: dereference of NULL ‘mc’
# 2904|   	case LDAP_BACK_CFG_CLIENT_PR:
# 2905|   		if ( strcasecmp( c->argv[ 1 ], "accept-unsolicited" ) == 0 ) {
# 2906|-> 			mc->mc_ps = META_CLIENT_PR_ACCEPT_UNSOLICITED;
# 2907|   
# 2908|   		} else if ( strcasecmp( c->argv[ 1 ], "disable" ) == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def357]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2909:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2905:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2908:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2908:27: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2909:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2909:25: danger: dereference of NULL ‘mc’
# 2907|   
# 2908|   		} else if ( strcasecmp( c->argv[ 1 ], "disable" ) == 0 ) {
# 2909|-> 			mc->mc_ps = META_CLIENT_PR_DISABLE;
# 2910|   
# 2911|   		} else if ( lutil_atoi( &mc->mc_ps, c->argv[ 1 ] ) || mc->mc_ps < -1 ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def358]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2911:71: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2905:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2908:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2908:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2911:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2911:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2911:71: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/config.c:2911:71: danger: dereference of NULL ‘mc’
# 2909|   			mc->mc_ps = META_CLIENT_PR_DISABLE;
# 2910|   
# 2911|-> 		} else if ( lutil_atoi( &mc->mc_ps, c->argv[ 1 ] ) || mc->mc_ps < -1 ) {
# 2912|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2913|   				"unable to parse client-pr {accept-unsolicited|disable|<size>}: \"%s\"",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def359]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:280:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1316:12: branch_false: following ‘false’ branch (when ‘op_type != 1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1474:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1474:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1477:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1480:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1483:37: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1483:35: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1488:30: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1489:55: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1493:28: branch_true: following ‘true’ branch (when ‘cached == i’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1502:44: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1502:44: call_function: calling ‘meta_back_init_one_conn’ from ‘meta_back_getconn’
#  278|   	int			version;
#  279|   	dncookie		dc;
#  280|-> 	int			isauthz = ( candidate == mc->mc_authz_target );
#  281|   	int			do_return = 0;
#  282|   #ifdef HAVE_TLS

Error: COMPILER_WARNING (CWE-563): [#def360]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_get_candidate’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:919:33: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  919 |                 int             rc;
#      |                                 ^~
#  917|   		SlapReply	rs2 = { REP_RESULT };
#  918|   		slap_callback	cb2 = { 0 };
#  919|-> 		int		rc;
#  920|   
#  921|   		/* try to get a unique match for the request ndn

Error: GCC_ANALYZER_WARNING (CWE-476): [#def361]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1244:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1207:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1234:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1236:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1236:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1236:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1237:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1240:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1243:30: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1243:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1244:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1244:33: danger: dereference of NULL ‘metaconn_alloc(op)’
# 1242|   			}
# 1243|   			if ( LDAP_BACK_CONN_ISPRIV( &mc_curr ) ) {
# 1244|-> 				LDAP_BACK_CONN_ISPRIV_SET( mc );
# 1245|   
# 1246|   			} else if ( LDAP_BACK_CONN_ISANON( &mc_curr ) ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def362]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1247:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1207:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1234:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1236:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1236:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1236:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1237:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1240:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1243:30: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1243:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1246:37: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1246:35: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1247:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1247:33: danger: dereference of NULL ‘metaconn_alloc(op)’
# 1245|   
# 1246|   			} else if ( LDAP_BACK_CONN_ISANON( &mc_curr ) ) {
# 1247|-> 				LDAP_BACK_CONN_ISANON_SET( mc );
# 1248|   			}
# 1249|   

Error: COMPILER_WARNING (CWE-563): [#def363]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1317:42: warning[-Wunused-but-set-variable]: variable ‘mt’ set but not used
# 1317 |                 metatarget_t            *mt = NULL;
#      |                                          ^~
# 1315|   
# 1316|   	if ( op_type == META_OP_REQUIRE_SINGLE ) {
# 1317|-> 		metatarget_t		*mt = NULL;
# 1318|   		metasingleconn_t	*msc = NULL;
# 1319|   

Error: COMPILER_WARNING (CWE-563): [#def364]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1318:42: warning[-Wunused-but-set-variable]: variable ‘msc’ set but not used
# 1318 |                 metasingleconn_t        *msc = NULL;
#      |                                          ^~~
# 1316|   	if ( op_type == META_OP_REQUIRE_SINGLE ) {
# 1317|   		metatarget_t		*mt = NULL;
# 1318|-> 		metasingleconn_t	*msc = NULL;
# 1319|   
# 1320|   		int			j;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def365]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1481:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1316:12: branch_false: following ‘false’ branch (when ‘op_type != 1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1474:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1474:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1477:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1480:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1481:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1481:33: danger: dereference of NULL ‘metaconn_alloc(op)’
# 1479|   			new_conn = 1;
# 1480|   			if ( LDAP_BACK_CONN_ISPRIV( &mc_curr ) ) {
# 1481|-> 				LDAP_BACK_CONN_ISPRIV_SET( mc );
# 1482|   
# 1483|   			} else if ( LDAP_BACK_CONN_ISANON( &mc_curr ) ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def366]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1484:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1316:12: branch_false: following ‘false’ branch (when ‘op_type != 1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1474:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1474:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1476:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1477:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1480:28: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1483:37: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1483:35: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1484:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/conn.c:1484:33: danger: dereference of NULL ‘metaconn_alloc(op)’
# 1482|   
# 1483|   			} else if ( LDAP_BACK_CONN_ISANON( &mc_curr ) ) {
# 1484|-> 				LDAP_BACK_CONN_ISANON_SET( mc );
# 1485|   			}
# 1486|   		}

Error: CPPCHECK_WARNING (CWE-457): [#def367]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/dncache.c:105: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  103|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  104|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  105|-> 			( caddr_t )&tmp_entry, meta_dncache_cmp );
#  106|   
#  107|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def368]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/dncache.c:161: warning[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  159|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  160|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  161|-> 			( caddr_t )&tmp_entry, meta_dncache_cmp );
#  162|   
#  163|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def369]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/dncache.c:212: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  210|   
#  211|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  212|-> 	entry = ldap_avl_delete( &cache->tree, ( caddr_t )&tmp_entry,
#  213|    			meta_dncache_cmp );
#  214|   	ldap_pvt_thread_mutex_unlock( &cache->mutex );

Error: COMPILER_WARNING (CWE-563): [#def370]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/init.c: scope_hint: In function ‘meta_back_db_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/init.c:243:28: warning[-Wunused-variable]: unused variable ‘rc’
#  243 |         int             i, rc;
#      |                            ^~
#  241|   	char msg[SLAP_TEXT_BUFLEN];
#  242|   
#  243|-> 	int		i, rc;
#  244|   
#  245|   	if ( mi->mi_ntargets == 0 ) {

Error: CPPCHECK_WARNING (CWE-457): [#def371]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/map.c:136: warning[uninitvar]: Uninitialized variable: fmapping.dst
#  134|   
#  135|   	fmapping.src = *s;
#  136|-> 	*m = (struct ldapmapping *)ldap_avl_find( tree, (caddr_t)&fmapping, mapping_cmp );
#  137|   	if ( *m == NULL ) {
#  138|   		return map->drop_missing;

Error: COMPILER_WARNING (CWE-563): [#def372]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/search.c:781:25: warning[-Wunused-but-set-variable]: variable ‘last’ set but not used
#  781 |         int             last = 0, ncandidates = 0,
#      |                         ^~~~
#  779|   	int		rc = 0, sres = LDAP_SUCCESS;
#  780|   	char		*matched = NULL;
#  781|-> 	int		last = 0, ncandidates = 0,
#  782|   			initial_candidates = 0, candidate_match = 0,
#  783|   			needbind = 0;

Error: COMPILER_WARNING (CWE-563): [#def373]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/search.c: scope_hint: In function ‘meta_back_search’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/search.c:985:25: warning[-Wunused-but-set-variable]: variable ‘doabandon’ set but not used
#  985 |                         doabandon = 0,
#      |                         ^~~~~~~~~
#  983|   	for ( rc = 0; ncandidates > 0; ) {
#  984|   		int	gotit = 0,
#  985|-> 			doabandon = 0,
#  986|   			alreadybound = ncandidates;
#  987|   

Error: COMPILER_WARNING: [#def374]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/search.c:1496:60: warning[-Wformat-truncation=]: ‘ meta_back_search[’ directive output may be truncated writing 18 bytes into a region of size between 1 and 256
# 1496 |                                                         "%s meta_back_search[%ld] "
#      |                                                            ^~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/search.c:1496:57: note: directive argument in the range [0, 2147483646]
# 1496 |                                                         "%s meta_back_search[%ld] "
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/search.c:1496:57: note: directive argument in the range [-2147483648, 2147483647]
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 36 and 310 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1494|   						char buf[ SLAP_TEXT_BUFLEN ];
# 1495|   						snprintf( buf, sizeof( buf ),
# 1496|-> 							"%s meta_back_search[%ld] "
# 1497|   							"match=\"%s\" err=%ld",
# 1498|   							op->o_log_prefix, i,

Error: COMPILER_WARNING: [#def375]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def376]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-meta/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_meta 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def377]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c:86:17: warning[-Wunused-variable]: unused variable ‘ep’
#   86 |         Entry **ep = NULL, *prev = NULL;
#      |                 ^~
#   84|   {
#   85|   	monitor_cache_t tmp_mc, *mc, *pmc = NULL;
#   86|-> 	Entry **ep = NULL, *prev = NULL;
#   87|   	int		rc = -1;
#   88|   

Error: COMPILER_WARNING (CWE-563): [#def378]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c: scope_hint: In function ‘monitor_cache_add’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c:86:29: warning[-Wunused-variable]: unused variable ‘prev’
#   86 |         Entry **ep = NULL, *prev = NULL;
#      |                             ^~~~
#   84|   {
#   85|   	monitor_cache_t tmp_mc, *mc, *pmc = NULL;
#   86|-> 	Entry **ep = NULL, *prev = NULL;
#   87|   	int		rc = -1;
#   88|   

Error: CPPCHECK_WARNING (CWE-457): [#def379]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c:209: error[uninitvar]: Uninitialized variable: tmp_mc.mc_e
#  207|   	ldap_pvt_thread_mutex_lock( &mi->mi_cache_lock );
#  208|   	mc = ( monitor_cache_t * )ldap_avl_find( mi->mi_cache,
#  209|-> 			( caddr_t )&tmp_mc, monitor_cache_cmp );
#  210|   
#  211|   	if ( mc != NULL ) {

Error: COMPILER_WARNING (CWE-1164): [#def380]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c: scope_hint: In function ‘monitor_cache_remove’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c:243:1: warning[-Wunused-label]: label ‘retry’ defined but not used
#  243 | retry:;
#      | ^~~~~
#  241|   	dnParent( ndn, &pndn );
#  242|   
#  243|-> retry:;
#  244|   	ldap_pvt_thread_mutex_lock( &mi->mi_cache_lock );
#  245|   

Error: CPPCHECK_WARNING (CWE-457): [#def381]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/cache.c:248: error[uninitvar]: Uninitialized variable: tmp_mc.mc_e
#  246|   	tmp_mc.mc_ndn = *ndn;
#  247|   	mc = ( monitor_cache_t * )ldap_avl_find( mi->mi_cache,
#  248|-> 			( caddr_t )&tmp_mc, monitor_cache_cmp );
#  249|   
#  250|   	if ( mc != NULL ) {

Error: COMPILER_WARNING (CWE-563): [#def382]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_overlay_init_one’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:117:34: warning[-Wunused-but-set-variable]: variable ‘bi’ set but not used
#  117 |         BackendInfo             *bi;
#      |                                  ^~
#  115|   	slap_overinst		*on2;
#  116|   	slap_overinfo		*oi = NULL;
#  117|-> 	BackendInfo		*bi;
#  118|   	monitor_entry_t		*mp_overlay;
#  119|   	struct berval		bv;

Error: COMPILER_WARNING (CWE-457): [#def383]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_database_init_one’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:370:37: warning[-Wmaybe-uninitialized]: ‘e_overlay’ may be used uninitialized
#  370 |                                 *ep = e_overlay;
#      |                                 ~~~~^~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:363:34: note: ‘e_overlay’ was declared here
#  363 |                 Entry           *e_overlay;
#      |                                  ^~~~~~~~~
#  368|   				ms, ms_overlay, on, e, &e_overlay );
#  369|   			if ( overlay == on ) {
#  370|-> 				*ep = e_overlay;
#  371|   			}
#  372|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def384]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:656:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘be’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:640:12: branch_false: following ‘false’ branch (when ‘i == 1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:644:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:644:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/database.c:656:14: danger: dereference of NULL ‘be’
#  654|   	}
#  655|   	/* do not allow some changes on back-monitor (needs work)... */
#  656|-> 	if ( SLAP_MONITOR( be ) ) {
#  657|   		rs->sr_text = "no modifications allowed to monitor database entry";
#  658|   		return ( rs->sr_err = LDAP_UNWILLING_TO_PERFORM );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def385]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:808:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elpp’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2224:1: enter_function: entry to ‘monitor_back_db_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2245:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2246:12: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2273:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2280:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2283:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2314:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2315:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2318:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2320:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2399:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2402:25: branch_true: following ‘true’ branch (when ‘el’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2406:34: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2402:25: branch_true: following ‘true’ branch (when ‘el’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2406:34: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:2416:38: call_function: calling ‘monitor_back_register_entry_parent’ from ‘monitor_back_db_open’
#  806|   
#  807|   done_limbo:;
#  808|-> 		if ( *elpp != NULL ) {
#  809|   			el.el_next = NULL;
#  810|   			**elpp = el;

Error: COMPILER_WARNING (CWE-665): [#def386]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c: scope_hint: In function ‘monitor_back_initialize’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/init.c:1642:43: warning[-Wmissing-braces]: missing braces around initializer
# 1642 |         static ConfigTable monitorcfg[] = {
#      |                                           ^
# 1640|   	};
# 1641|   
# 1642|-> 	static ConfigTable monitorcfg[] = {
# 1643|   		{ NULL, NULL, 0, 0, 0, ARG_IGNORED,
# 1644|   			NULL, NULL, NULL, NULL }

Error: COMPILER_WARNING: [#def387]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def388]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-monitor/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_monitor 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def389]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-null/null.c:36:32: warning[-Wmissing-braces]: missing braces around initializer
#   36 | static ConfigTable nullcfg[] = {
#      |                                ^
#   34|   } null_info;
#   35|   
#   36|-> static ConfigTable nullcfg[] = {
#   37|   	{ "bind", "true|FALSE", 1, 2, 0, ARG_ON_OFF|ARG_OFFSET,
#   38|   		(void *)offsetof(null_info, ni_bind_allowed),

Error: COMPILER_WARNING: [#def390]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-null/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def391]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-null/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_null 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def392]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-passwd/config.c:43:34: warning[-Wmissing-braces]: missing braces around initializer
#   43 | static ConfigTable passwdcfg[] = {
#      |                                  ^
#   41|   #include "slap-config.h"
#   42|   
#   43|-> static ConfigTable passwdcfg[] = {
#   44|   	{ "file", "filename", 2, 2, 0,
#   45|   #ifdef HAVE_SETPWFILE

Error: COMPILER_WARNING: [#def393]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-passwd/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def394]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-passwd/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_passwd 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def395]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c:29:32: warning[-Wmissing-braces]: missing braces around initializer
#   29 | static ConfigTable perlcfg[] = {
#      |                                ^
#   27|   };
#   28|   
#   29|-> static ConfigTable perlcfg[] = {
#   30|   	{ "perlModule", "module", 2, 2, 0,
#   31|   		ARG_STRING|ARG_MAGIC|PERL_MODULE, perl_cf, 

Error: COMPILER_WARNING (CWE-563): [#def396]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c: scope_hint: At top level
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c:68:18: warning[-Wunused-variable]: ‘ovperlocs’ defined but not used
#   68 | static ConfigOCs ovperlocs[] = {
#      |                  ^~~~~~~~~
#   66|   };
#   67|   
#   68|-> static ConfigOCs ovperlocs[] = {
#   69|   	{ "( OLcfgDbOc:11.2 "
#   70|   		"NAME 'olcovPerlConfig' "

Error: COMPILER_WARNING (CWE-563): [#def397]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c: scope_hint: In function ‘perl_cf’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c:116:13: warning[-Wunused-but-set-variable]: variable ‘loc_sv’ set but not used
#  116 |         SV* loc_sv;
#      |             ^~~~~~
#  114|   {
#  115|   	PerlBackend *pb = (PerlBackend *) c->be->be_private;
#  116|-> 	SV* loc_sv;
#  117|   	int count ;
#  118|   	int args;

Error: COMPILER_WARNING: [#def398]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c: scope_hint: In function ‘perl_cf’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/config.c:184:76: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 4123 bytes into a region of size 256
#  184 |                                 snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: error %s",
#      |                                                                            ^~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 9 or more bytes (assuming 4132) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  182|   				STRLEN len;
#  183|   
#  184|-> 				snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: error %s",
#  185|   					c->log, SvPV(ERRSV, len ));
#  186|   				Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg );

Error: COMPILER_WARNING: [#def399]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def400]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-perl/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_perl 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def401]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/init.c:33:33: warning[-Wmissing-braces]: missing braces around initializer
#   33 | static ConfigTable relaycfg[] = {
#      |                                 ^
#   31|   static ConfigDriver relay_back_cf;
#   32|   
#   33|-> static ConfigTable relaycfg[] = {
#   34|   	{ "relay", "relay", 2, 2, 0,
#   35|   		ARG_MAGIC|ARG_DN|ARG_QUOTE,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def402]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:149:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rs’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:315:1: enter_function: entry to ‘relay_back_has_subordinates’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:320:14: call_function: calling ‘relay_back_select_backend’ from ‘relay_back_has_subordinates’
#  147|   
#  148|   		/* if we set sr_err to LDAP_REFERRAL, we must provide one */
#  149|-> 		rs->sr_ref = referral_rewrite(
#  150|   			default_referral, NULL, &op->o_req_dn,
#  151|   			op->o_tag == LDAP_REQ_SEARCH ?

Error: GCC_ANALYZER_WARNING (CWE-476): [#def403]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:164:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rs’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:315:1: enter_function: entry to ‘relay_back_has_subordinates’
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:320:14: call_function: calling ‘relay_back_select_backend’ from ‘relay_back_has_subordinates’
#  162|   
#  163|   	if ( fail_mode & RB_BDERR ) {
#  164|-> 		rs->sr_err = rc;
#  165|   		if ( fail_mode & RB_SEND ) {
#  166|   			send_ldap_result( op, rs );

Error: CPPCHECK_WARNING (CWE-562): [#def404]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/op.c:210: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  208|   		relay_callback	rcb;
#  209|   
#  210|-> 		relay_back_add_cb( &rcb, op );
#  211|   		RELAY_WRAP_OP( op, bd, which, {
#  212|   			rc = (&bi->bi_op_bind)[which]( op, rs );

Error: COMPILER_WARNING: [#def405]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def406]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-relay/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_relay 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def407]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-sock/config.c:46:30: warning[-Wmissing-braces]: missing braces around initializer
#   46 | static ConfigTable bscfg[] = {
#      |                              ^
#   44|   #define NUM_OV_ATTRS	3
#   45|   
#   46|-> static ConfigTable bscfg[] = {
#   47|   	{ "sockops", "ops", 2, 0, 0, ARG_MAGIC|BS_OPS,
#   48|   		bs_cf_gen, "( OLcfgDbAt:7.3 NAME 'olcOvSocketOps' "

Error: COMPILER_WARNING: [#def408]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-sock/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def409]
openldap-2.6.9/openldap-2.6.9/servers/slapd/back-sock/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_sock 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def410]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:81:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘on’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1209:1: enter_function: entry to ‘glue_tool_entry_put’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1219:37: call_function: calling ‘glue_tool_inst’ from ‘glue_tool_entry_put’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1219:37: return_function: returning to ‘glue_tool_entry_put’ from ‘glue_tool_inst’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1219:9: release_memory: ‘b2.bd_info’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1220:14: call_function: calling ‘glue_back_select’ from ‘glue_tool_entry_put’
#   79|   		}
#   80|   	}
#   81|-> 	be->bd_info = on->on_info->oi_orig;
#   82|   	return be;
#   83|   }

Error: CPPCHECK_WARNING (CWE-562): [#def411]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:461: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  459|   	case LDAP_SCOPE_SUBTREE:
#  460|   	case LDAP_SCOPE_SUBORDINATE: /* FIXME */
#  461|-> 		op->o_callback = &cb;
#  462|   		rs->sr_err = gs.err = LDAP_UNWILLING_TO_PERFORM;
#  463|   		scope0 = op->ors_scope;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def412]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:861:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:841:1: enter_function: entry to ‘glue_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:845:29: call_function: calling ‘glue_tool_inst’ from ‘glue_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:845:29: return_function: returning to ‘glue_open’ from ‘glue_tool_inst’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:853:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:856:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:857:29: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:860:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:861:33: danger: dereference of NULL ‘glue_tool_inst(bi)’
#  859|   			/* Same bi_open as our main backend? */
#  860|   			if ( gi->gi_n[i].gn_be->bd_info->bi_open ==
#  861|-> 				on->on_info->oi_orig->bi_open )
#  862|   				bsame = 1;
#  863|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def413]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:883:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:841:1: enter_function: entry to ‘glue_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:845:29: call_function: calling ‘glue_tool_inst’ from ‘glue_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:845:29: return_function: returning to ‘glue_open’ from ‘glue_tool_inst’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:853:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:856:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:857:29: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:883:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:883:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:883:39: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:883:39: danger: dereference of NULL ‘glue_tool_inst(bi)’
#  881|   			if ( rc ) break;
#  882|   		}
#  883|-> 		if ( !rc && !bsame && on->on_info->oi_orig->bi_open )
#  884|   			rc = on->on_info->oi_orig->bi_open( on->on_info->oi_orig );
#  885|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def414]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1292:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1279:1: enter_function: entry to ‘glue_tool_sync’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1283:31: call_function: calling ‘glue_tool_inst’ from ‘glue_tool_sync’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1283:31: return_function: returning to ‘glue_tool_sync’ from ‘glue_tool_inst’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backglue.c:1292:23: danger: dereference of NULL ‘glue_tool_inst(*b0.bd_info)’
# 1290|   		if (gi->gi_n[i].gn_be->be_sync)
# 1291|   			gi->gi_n[i].gn_be->be_sync (gi->gi_n[i].gn_be);
# 1292|-> 	b0->bd_info = on->on_info->oi_orig;
# 1293|   	if ( b0->be_sync )
# 1294|   		b0->be_sync( b0 );

Error: CPPCHECK_WARNING (CWE-562): [#def415]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:239: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  237|   
#  238|   	db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  239|-> 	op->o_bd = &db;
#  240|   	for (; on; on=on->on_next ) {
#  241|   		if ( on->on_bi.bi_flags & SLAPO_BFLAG_DISABLED )

Error: CPPCHECK_WARNING (CWE-562): [#def416]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:295: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  293|    				db = *op->o_bd;
#  294|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  295|-> 				op->o_bd = &db;
#  296|   			}
#  297|   

Error: CPPCHECK_WARNING (CWE-562): [#def417]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:360: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  358|    				db = *op->o_bd;
#  359|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  360|-> 				op->o_bd = &db;
#  361|   			}
#  362|   

Error: CPPCHECK_WARNING (CWE-562): [#def418]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:435: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  433|    				db = *op->o_bd;
#  434|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  435|-> 				op->o_bd = &db;
#  436|   			}
#  437|   

Error: CPPCHECK_WARNING (CWE-562): [#def419]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:517: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  515|    				db = *op->o_bd;
#  516|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  517|-> 				op->o_bd = &db;
#  518|   			}
#  519|   

Error: CPPCHECK_WARNING (CWE-562): [#def420]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:590: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  588|    				db = *op->o_bd;
#  589|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  590|-> 				op->o_bd = &db;
#  591|   			}
#  592|   

Error: CPPCHECK_WARNING (CWE-562): [#def421]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:754: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  752|    		db = *op->o_bd;
#  753|   		db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  754|-> 		op->o_bd = &db;
#  755|   	}
#  756|   	if ( op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def422]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:769:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘cb’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:842:1: enter_function: entry to ‘over_op_extended’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:844:16: call_function: calling ‘over_op_func’ from ‘over_op_extended’
#  767|   	if ( rc != SLAPD_ASYNCOP && op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {
#  768|   		for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) {
#  769|-> 			if ( *sc == cb ) {
#  770|   				*sc = cb->sc_next;
#  771|   				op->o_tmpfree( cb, op->o_tmpmemctx );

Error: COMPILER_WARNING (CWE-457): [#def423]
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c: scope_hint: In function ‘over_op_func’
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:769:28: warning[-Wmaybe-uninitialized]: ‘cb’ may be used uninitialized
#  769 |                         if ( *sc == cb ) {
#      |                            ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/backover.c:741:24: note: ‘cb’ was declared here
#  741 |         slap_callback *cb;
#      |                        ^~
#  767|   	if ( rc != SLAPD_ASYNCOP && op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {
#  768|   		for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) {
#  769|-> 			if ( *sc == cb ) {
#  770|   				*sc = cb->sc_next;
#  771|   				op->o_tmpfree( cb, op->o_tmpmemctx );

Error: COMPILER_WARNING (CWE-665): [#def424]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:293:45: warning[-Wmissing-braces]: missing braces around initializer
#  293 | static ConfigTable config_back_cf_table[] = {
#      |                                             ^
#  291|   /* alphabetical ordering */
#  292|   
#  293|-> static ConfigTable config_back_cf_table[] = {
#  294|   	/* This attr is read-only */
#  295|   	{ "", "", 0, 0, 0, ARG_MAGIC,

Error: COMPILER_WARNING (CWE-665): [#def425]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:951:34: warning[-Wmissing-braces]: missing braces around initializer
#  951 | ConfigTable olcDatabaseDummy[] = {
#      |                                  ^
#  949|   
#  950|   /* Need to no-op this keyword for dynamic config */
#  951|-> ConfigTable olcDatabaseDummy[] = {
#  952|   	{ "", "", 0, 0, 0, ARG_IGNORED,
#  953|   		NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "

Error: CPPCHECK_WARNING (CWE-457): [#def426]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:1679: warning[uninitvar]: Uninitialized variable: *prev
# 1677|   					prev = &a->acl_next;
# 1678|   				}
# 1679|-> 				a = *prev;
# 1680|   				*prev = a->acl_next;
# 1681|   				acl_free( a );

Error: CPPCHECK_WARNING (CWE-457): [#def427]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:2255: warning[uninitvar]: Uninitialized variable: sv
# 2253|   				svtail = sv;
# 2254|   			}
# 2255|-> 			sv->al_next = NULL;
# 2256|   			for ( sv = svnew; sv; sv = sv->al_next )
# 2257|   				sv->al_desc->ad_type->sat_flags |= SLAP_AT_SORTED_VAL;

Error: COMPILER_WARNING (CWE-457): [#def428]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c: scope_hint: In function ‘config_generic’
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:2255:37: warning[-Wmaybe-uninitialized]: ‘svtail’ may be used uninitialized
# 2255 |                         sv->al_next = NULL;
#      |                                     ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:2220:48: note: ‘svtail’ was declared here
# 2220 |                         ADlist *svnew = NULL, *svtail, *sv;
#      |                                                ^~~~~~
# 2253|   				svtail = sv;
# 2254|   			}
# 2255|-> 			sv->al_next = NULL;
# 2256|   			for ( sv = svnew; sv; sv = sv->al_next )
# 2257|   				sv->al_desc->ad_type->sat_flags |= SLAP_AT_SORTED_VAL;

Error: CPPCHECK_WARNING (CWE-562): [#def429]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6428: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6426|   		slap_unpause_server();
# 6427|   out:
# 6428|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6429|   	send_ldap_result( op, rs );
# 6430|   	slap_graduate_commit_csn( op );

Error: COMPILER_WARNING (CWE-457): [#def430]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6640:29: warning[-Wmaybe-uninitialized]: ‘ixnew’ may be used uninitialized
# 6640 |                 for ( i=0; i<ixnew; i++ ) {
#      |                            ~^~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6440:20: note: ‘ixnew’ was declared here
# 6440 |         int ixold, ixnew, dopause = 1;
#      |                    ^~~~~
# 6638|   		/* Insert into new slot */
# 6639|   		cprev = cbprev;
# 6640|-> 		for ( i=0; i<ixnew; i++ ) {
# 6641|   			ce2 = *cprev;
# 6642|   			if ( !ce2 )

Error: COMPILER_WARNING (CWE-457): [#def431]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c: scope_hint: In function ‘config_back_modrdn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6657:20: warning[-Wmaybe-uninitialized]: ‘ixold’ may be used uninitialized
# 6657 |                 if ( ixold < ixnew ) {
#      |                    ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6440:13: note: ‘ixold’ was declared here
# 6440 |         int ixold, ixnew, dopause = 1;
#      |             ^~~~~
# 6655|   			overlay_move( ce->ce_be, (slap_overinst *)ce->ce_bi, ixnew );
# 6656|   			
# 6657|-> 		if ( ixold < ixnew ) {
# 6658|   			rs->sr_err = config_rename_del( op, rs, ce, ceold, ixold,
# 6659|   				cfb->cb_use_ldif );

Error: CPPCHECK_WARNING (CWE-562): [#def432]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6687: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6685|   		slap_unpause_server();
# 6686|   out:
# 6687|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6688|   	send_ldap_result( op, rs );
# 6689|   	return rs->sr_err;

Error: CPPCHECK_WARNING (CWE-562): [#def433]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:6864: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6862|   	}
# 6863|   out:
# 6864|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6865|   #else
# 6866|   	rs->sr_err = LDAP_UNWILLING_TO_PERFORM;

Error: CPPCHECK_WARNING (CWE-457): [#def434]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bconfig.c:7571: warning[uninitvar]: Uninitialized variables: vl.vl_next, vl.vl_ptr
# 7569|   				vl->vl_ptr = on;
# 7570|   			}
# 7571|-> 			for (j=0; vl; j++,vl=v0) {
# 7572|   				on = vl->vl_ptr;
# 7573|   				v0 = vl->vl_next;

Error: COMPILER_WARNING (CWE-1164): [#def435]
openldap-2.6.9/openldap-2.6.9/servers/slapd/bind.c: scope_hint: In function ‘fe_op_lastbind’
openldap-2.6.9/openldap-2.6.9/servers/slapd/bind.c:506:1: warning[-Wunused-label]: label ‘done’ defined but not used
#  506 | done:
#      | ^~~~
#  504|   	slap_mods_free( m, 1 );
#  505|   
#  506|-> done:
#  507|   	return rc;
#  508|   }

Error: COMPILER_WARNING (CWE-681): [#def436]
openldap-2.6.9/openldap-2.6.9/servers/slapd/config.c: scope_hint: In function ‘config_find_keyword’
openldap-2.6.9/openldap-2.6.9/servers/slapd/config.c:137:56: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘lutil_b64_pton’ differ in signedness
#  137 |                 c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
#      |                                                       ~^~~~~~~
#      |                                                        |
#      |                                                        char *
openldap-2.6.9/openldap-2.6.9/include/portable.h:1189: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/servers/slapd/config.c:27: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/include/lutil.h:55:9: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#   55 |         unsigned char *,
#      |         ^~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  135|   		ch_free( c->tline );
#  136|   		c->tline = ch_malloc( decode_len+1 );
#  137|-> 		c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
#  138|   		if ( c->linelen < 0 )
#  139|   		{

Error: COMPILER_WARNING (CWE-563): [#def437]
openldap-2.6.9/openldap-2.6.9/servers/slapd/controls.c: scope_hint: In function ‘register_control_exop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/controls.c:385:16: warning[-Wunused-variable]: unused variable ‘extendedops’
#  385 |         char **extendedops;
#      |                ^~~~~~~~~~~
#  383|   	struct slap_control *sc = NULL;
#  384|   	BerVarray extendedopsbv;
#  385|-> 	char **extendedops;
#  386|   	int i;
#  387|   

Error: COMPILER_WARNING (CWE-563): [#def438]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c: scope_hint: In function ‘slapd_remove’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:458:17: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  458 |         int fd, rc, index = SLAP_EPOLL_SOCK_IX(t,(s)); \
#      |                 ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1161:9: note: in expansion of macro ‘SLAP_SOCK_DEL’
# 1161 |         SLAP_SOCK_DEL(id, s);
#      |         ^~~~~~~~~~~~~
#  456|   
#  457|   # define SLAP_SOCK_DEL(t,s)		do { \
#  458|-> 	int fd, rc, index = SLAP_EPOLL_SOCK_IX(t,(s)); \
#  459|   	if ( index < 0 ) break; \
#  460|   	rc = epoll_ctl(slap_daemon[t].sd_epfd, EPOLL_CTL_DEL, \

Error: CPPCHECK_WARNING (CWE-476): [#def439]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1391: warning[nullPointer]: Possible null pointer dereference: host
# 1389|   		sap[1] = NULL;
# 1390|   
# 1391|-> 		if ( strlen(host) >
# 1392|   			(sizeof(((struct sockaddr_un *)*sap)->sun_path) - 1) )
# 1393|   		{

Error: GCC_ANALYZER_WARNING (CWE-688): [#def440]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1391:22: warning[-Wanalyzer-null-argument]: use of NULL ‘host’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1505:1: enter_function: entry to ‘slap_open_listener’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1530:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1537:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1554:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1559:56: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1569:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1584:24: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:1587:31: call_function: calling ‘slap_get_listener_addresses’ from ‘slap_open_listener’
#argument 1 of ‘__builtin_strlen’ must be non-null
# 1389|   		sap[1] = NULL;
# 1390|   
# 1391|-> 		if ( strlen(host) >
# 1392|   			(sizeof(((struct sockaddr_un *)*sap)->sun_path) - 1) )
# 1393|   		{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def441]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2137:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2174:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2183:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2137:9: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2135|   		SET_CLOSE(s);
# 2136|   	}
# 2137|-> 	Debug( LDAP_DEBUG_CONNS,
# 2138|   		"daemon: accept() = %d\n", s );
# 2139|   

Error: COMPILER_WARNING (CWE-563): [#def442]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2657:45: warning[-Wunused-but-set-variable]: variable ‘nwriters’ set but not used
# 2657 |                 int                     ns, nwriters;
#      |                                             ^~~~~~~~
# 2655|   	while ( !slapd_shutdown ) {
# 2656|   		ber_socket_t		i;
# 2657|-> 		int			ns, nwriters;
# 2658|   		int			at;
# 2659|   		ber_socket_t		nfds;

Error: COMPILER_WARNING (CWE-563): [#def443]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:2659:41: warning[-Wunused-but-set-variable]: variable ‘nfds’ set but not used
# 2659 |                 ber_socket_t            nfds;
#      |                                         ^~~~
# 2657|   		int			ns, nwriters;
# 2658|   		int			at;
# 2659|-> 		ber_socket_t		nfds;
# 2660|   #if SLAP_EVENTS_ARE_INDEXED
# 2661|   		ber_socket_t		nrfds, nwfds;

Error: COMPILER_WARNING (CWE-563): [#def444]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c: scope_hint: In function ‘slapd_daemon_task’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3057:48: warning[-Wunused-but-set-variable]: variable ‘r’ set but not used
# 3057 |                         int rc = 1, fd, w = 0, r = 0;
#      |                                                ^
# 3055|   
# 3056|   		for ( i = 0; i < ns; i++ ) {
# 3057|-> 			int rc = 1, fd, w = 0, r = 0;
# 3058|   
# 3059|   			if ( SLAP_EVENT_IS_LISTENER( tid, i ) ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def445]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3558:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3558:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3559:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3558:38: danger: ‘**slap_listeners.sl_sd’ leaks here
# 3556|   {
# 3557|   	int i;
# 3558|-> 	for (i=0; slap_listeners[i]; i++) {
# 3559|   		slap_listeners[i]->sl_mute = 1;
# 3560|   		listen( slap_listeners[i]->sl_sd, 0 );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def446]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3559:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3558:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3559:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3558:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3559:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3559:17: danger: ‘**slap_listeners.sl_sd’ leaks here
# 3557|   	int i;
# 3558|   	for (i=0; slap_listeners[i]; i++) {
# 3559|-> 		slap_listeners[i]->sl_mute = 1;
# 3560|   		listen( slap_listeners[i]->sl_sd, 0 );
# 3561|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def447]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3569:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3569:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3570:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3569:38: danger: ‘**slap_listeners.sl_sd’ leaks here
# 3567|   {
# 3568|   	int i;
# 3569|-> 	for (i=0; slap_listeners[i]; i++) {
# 3570|   		slap_listeners[i]->sl_mute = 0;
# 3571|   		listen( slap_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def448]
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3570:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3569:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3570:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3569:19: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3570:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/daemon.c:3570:17: danger: ‘**slap_listeners.sl_sd’ leaks here
# 3568|   	int i;
# 3569|   	for (i=0; slap_listeners[i]; i++) {
# 3570|-> 		slap_listeners[i]->sl_mute = 0;
# 3571|   		listen( slap_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );
# 3572|   	}

Error: CPPCHECK_WARNING (CWE-562): [#def449]
openldap-2.6.9/openldap-2.6.9/servers/slapd/delete.c:202: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  200|   					op->o_req_dn = pdn;
#  201|   					op->o_req_ndn = pdn;
#  202|-> 					op->o_callback = &cb;
#  203|   					op->o_bd->be_delete( op, rs );
#  204|   				} else {

Error: COMPILER_WARNING (CWE-563): [#def450]
openldap-2.6.9/openldap-2.6.9/servers/slapd/entry.c: scope_hint: In function ‘entry_decode’
openldap-2.6.9/openldap-2.6.9/servers/slapd/entry.c:818:27: warning[-Wunused-but-set-variable]: variable ‘nvals’ set but not used
#  818 |         int i, j, nattrs, nvals;
#      |                           ^~~~~
#  816|   #endif
#  817|   {
#  818|-> 	int i, j, nattrs, nvals;
#  819|   	int rc;
#  820|   	Attribute *a;

Error: COMPILER_WARNING (CWE-563): [#def451]
openldap-2.6.9/openldap-2.6.9/servers/slapd/extended.c: scope_hint: In function ‘fe_extended’
openldap-2.6.9/openldap-2.6.9/servers/slapd/extended.c:203:33: warning[-Wunused-but-set-variable]: variable ‘reqdata’ set but not used
#  203 |         struct berval           reqdata = BER_BVNULL;
#      |                                 ^~~~~~~
#  201|   {
#  202|   	struct extop_list	*ext = NULL;
#  203|-> 	struct berval		reqdata = BER_BVNULL;
#  204|   
#  205|   	if (op->ore_reqdata) {

Error: COMPILER_WARNING (CWE-563): [#def452]
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c: scope_hint: In function ‘slap_debug_print’
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:143:57: warning[-Wunused-value]: value computed is not used
#  143 |                                                         !write( 2, buf, len );
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~
#  141|   							rc, AC_STRERROR_R( rc, ebuf, sizeof(ebuf) ));
#  142|   						if ( !logfile_only )
#  143|-> 							!write( 2, buf, len );
#  144|   						!write( logfile_fd, buf, len );
#  145|   						logfile_rotfail = 1;

Error: COMPILER_WARNING (CWE-563): [#def453]
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:144:49: warning[-Wunused-value]: value computed is not used
#  144 |                                                 !write( logfile_fd, buf, len );
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  142|   						if ( !logfile_only )
#  143|   							!write( 2, buf, len );
#  144|-> 						!write( logfile_fd, buf, len );
#  145|   						logfile_rotfail = 1;
#  146|   					}

Error: COMPILER_WARNING (CWE-563): [#def454]
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:161:57: warning[-Wunused-value]: value computed is not used
#  161 |                                                         !write( 2, buf, len );
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~
#  159|   							rc, AC_STRERROR_R( rc, ebuf, sizeof(ebuf) ));
#  160|   						if ( !logfile_only )
#  161|-> 							!write( 2, buf, len );
#  162|   						!write( logfile_fd, buf, len );
#  163|   						logfile_openfail = 1;

Error: COMPILER_WARNING (CWE-563): [#def455]
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:162:49: warning[-Wunused-value]: value computed is not used
#  162 |                                                 !write( logfile_fd, buf, len );
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  160|   						if ( !logfile_only )
#  161|   							!write( 2, buf, len );
#  162|-> 						!write( logfile_fd, buf, len );
#  163|   						logfile_openfail = 1;
#  164|   					}

Error: GCC_ANALYZER_WARNING: [#def456]
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:260:17: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘strcpy’
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:74:1: enter_function: entry to ‘slap_debug_print’
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:125:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:126:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:132:28: branch_true: following ‘true’ branch (when ‘rotate != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:134:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/logging.c:153:44: call_function: calling ‘logfile_open’ from ‘slap_debug_print’
#  258|   			goto fail;
#  259|   		}
#  260|-> 		strcpy( logfile_path, path );
#  261|   		strcpy( logpaths[0], path );
#  262|   		strcpy( logpaths[1], path );

Error: COMPILER_WARNING (CWE-252): [#def457]
openldap-2.6.9/openldap-2.6.9/servers/slapd/main.c: scope_hint: In function ‘main’
openldap-2.6.9/openldap-2.6.9/servers/slapd/main.c:858:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  858 |                 write( waitfds[1], "1", 1 );
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  856|   #ifndef HAVE_WINSOCK
#  857|   	if ( !no_detach ) {
#  858|-> 		write( waitfds[1], "1", 1 );
#  859|   		close( waitfds[1] );
#  860|   	}

Error: COMPILER_WARNING (CWE-563): [#def458]
openldap-2.6.9/openldap-2.6.9/servers/slapd/modify.c: scope_hint: In function ‘slap_mods_opattrs’
openldap-2.6.9/openldap-2.6.9/servers/slapd/modify.c:874:41: warning[-Wunused-but-set-variable]: variable ‘modlast’ set but not used
#  874 |         Modifications *mod, **modtail, *modlast;
#      |                                         ^~~~~~~
#  872|   	char timebuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
#  873|   	char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ];
#  874|-> 	Modifications *mod, **modtail, *modlast;
#  875|   	int gotcsn = 0, gotmname = 0, gotmtime = 0;
#  876|   

Error: CPPCHECK_WARNING (CWE-562): [#def459]
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:354: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  352|   						op->o_req_dn = pdn;
#  353|   						op->o_req_ndn = pdn;
#  354|-> 						op->o_callback = &cb;
#  355|   						op->o_bd->be_delete( op, rs );
#  356|   					} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def460]
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:513:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:449:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:452:14: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:454:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:465:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:465:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:477:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:480:26: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:512:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:512:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:513:41: release_memory: ‘0’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:513:41: release_memory: ‘0’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/modrdn.c:513:34: danger: dereference of NULL ‘old_rdn + (long unsigned int)d_cnt * 8’
#  511|   	/* Remove old rdn value if required */
#  512|   	if ( op->orr_deleteoldrdn ) {
#  513|-> 		for ( d_cnt = 0; old_rdn[d_cnt]; d_cnt++ ) {
#  514|   			AttributeDescription	*desc = NULL;
#  515|   

Error: COMPILER_WARNING (CWE-665): [#def461]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:112:34: warning[-Wmissing-braces]: missing braces around initializer
#  112 | static ConfigTable log_cfats[] = {
#      |                                  ^
#  110|   };
#  111|   
#  112|-> static ConfigTable log_cfats[] = {
#  113|   	{ "logdb", "suffix", 2, 2, 0, ARG_DN|ARG_QUOTE|ARG_MAGIC|LOG_DB,
#  114|   		log_cf_gen, "( OLcfgOvAt:4.1 NAME 'olcAccessLogDB' "

Error: COMPILER_WARNING (CWE-563): [#def462]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_purge’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:705:14: warning[-Wunused-variable]: unused variable ‘csnbuf’
#  705 |         char csnbuf[LDAP_PVT_CSNSTR_BUFSIZE];
#      |              ^~~~~~
#  703|   	purge_data pd = { .li = li };
#  704|   	char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE];
#  705|-> 	char csnbuf[LDAP_PVT_CSNSTR_BUFSIZE];
#  706|   	time_t old = slap_get_time();
#  707|   

Error: COMPILER_WARNING (CWE-1164): [#def463]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_response’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:2027:1: warning[-Wunused-label]: label ‘done’ defined but not used
# 2027 | done:
#      | ^~~~
# 2025|   	}
# 2026|   
# 2027|-> done:
# 2028|   	ldap_pvt_thread_mutex_unlock( &li->li_log_mutex );
# 2029|   	if ( old ) entry_free( old );

Error: COMPILER_WARNING (CWE-563): [#def464]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_op_mod’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:2114:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 2114 |                 int rc;
#      |                     ^~
# 2112|   		( op->o_tag == LDAP_REQ_MODRDN && li->li_oldattrs )))
# 2113|   	{
# 2114|-> 		int rc;
# 2115|   		Entry *e;
# 2116|   

Error: COMPILER_WARNING (CWE-563): [#def465]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:2127:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 2127 |                 int rc;
#      |                     ^~
# 2125|   
# 2126|   	} else {
# 2127|-> 		int rc;
# 2128|   		Entry *e;
# 2129|   

Error: COMPILER_WARNING (CWE-563): [#def466]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_db_root’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:2399:13: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 2399 |         int rc;
#      |             ^~
# 2397|   
# 2398|   	Entry *e;
# 2399|-> 	int rc;
# 2400|   
# 2401|   	ldap_pvt_thread_mutex_lock( &li->li_log_mutex );

Error: COMPILER_WARNING (CWE-563): [#def467]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:2631:26: warning[-Wunused-variable]: unused variable ‘c2’
# 2631 |         int part, c, c1, c2, tzoffset, leapyear = 0;
#      |                          ^~
# 2629|   	};
# 2630|   	char *p, *e;
# 2631|-> 	int part, c, c1, c2, tzoffset, leapyear = 0;
# 2632|   
# 2633|   	p = val->bv_val;

Error: COMPILER_WARNING (CWE-563): [#def468]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘check_rdntime_syntax’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/accesslog.c:2682:31: warning[-Wunused-variable]: unused variable ‘end_num’
# 2682 |                         char *end_num;
#      |                               ^~~~~~~
# 2680|   		fraction->bv_len = 0;
# 2681|   		if (p < e && (*p == '.' || *p == ',')) {
# 2682|-> 			char *end_num;
# 2683|   			while (++p < e && ASCII_DIGIT(*p)) {
# 2684|   				/* EMPTY */;

Error: COMPILER_WARNING (CWE-665): [#def469]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/auditlog.c:40:36: warning[-Wmissing-braces]: missing braces around initializer
#   40 | static ConfigTable auditlogcfg[] = {
#      |                                    ^
#   38|   } auditlog_data;
#   39|   
#   40|-> static ConfigTable auditlogcfg[] = {
#   41|   	{ "auditlog", "filename", 2, 2, 0,
#   42|   	  ARG_STRING|ARG_OFFSET,

Error: COMPILER_WARNING: [#def470]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:47:9: warning: ‘X509_get_notBefore’ redefined
#   47 | #define X509_get_notBefore(x)   X509_getm_notBefore(x)
#      |         ^~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:35: included_from: Included from here.
/usr/include/openssl/x509.h:872:11: note: this is the location of the previous definition
#  872 | #  define X509_get_notBefore X509_getm_notBefore
#      |           ^~~~~~~~~~~~~~~~~~
#   45|   #if OPENSSL_VERSION_NUMBER >= 0x10100000
#   46|   #include <openssl/rsa.h>
#   47|-> #define X509_get_notBefore(x)	X509_getm_notBefore(x)
#   48|   #define X509_get_notAfter(x)	X509_getm_notAfter(x)
#   49|   #endif

Error: COMPILER_WARNING: [#def471]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:47:9: warning[warning]: ‘X509_get_notBefore’ redefined
#   45|   #if OPENSSL_VERSION_NUMBER >= 0x10100000
#   46|   #include <openssl/rsa.h>
#   47|-> #define X509_get_notBefore(x)	X509_getm_notBefore(x)
#   48|   #define X509_get_notAfter(x)	X509_getm_notAfter(x)
#   49|   #endif

Error: COMPILER_WARNING: [#def472]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:48:9: warning: ‘X509_get_notAfter’ redefined
#   48 | #define X509_get_notAfter(x)    X509_getm_notAfter(x)
#      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/x509.h:873:11: note: this is the location of the previous definition
#  873 | #  define X509_get_notAfter X509_getm_notAfter
#      |           ^~~~~~~~~~~~~~~~~
#   46|   #include <openssl/rsa.h>
#   47|   #define X509_get_notBefore(x)	X509_getm_notBefore(x)
#   48|-> #define X509_get_notAfter(x)	X509_getm_notAfter(x)
#   49|   #endif
#   50|   

Error: COMPILER_WARNING: [#def473]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:48:9: warning[warning]: ‘X509_get_notAfter’ redefined
#   46|   #include <openssl/rsa.h>
#   47|   #define X509_get_notBefore(x)	X509_getm_notBefore(x)
#   48|-> #define X509_get_notAfter(x)	X509_getm_notAfter(x)
#   49|   #endif
#   50|   

Error: CPPCHECK_WARNING (CWE-562): [#def474]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:452: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  450|   	op->o_bd->bd_info = args->on->on_info->oi_orig;
#  451|   	op->o_tag = LDAP_REQ_MODIFY;
#  452|-> 	op->o_callback = &cb;
#  453|   	op->orm_modlist = mod;
#  454|   	op->orm_no_opattrs = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def475]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:561: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  559|   
#  560|   	op->o_tag = LDAP_REQ_MODIFY;
#  561|-> 	op->o_callback = &cb;
#  562|   	op->orm_modlist = mod;
#  563|   	op->orm_no_opattrs = 1;

Error: COMPILER_WARNING (CWE-665): [#def476]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/autoca.c:728:35: warning[-Wmissing-braces]: missing braces around initializer
#  728 | static ConfigTable autoca_cfg[] = {
#      |                                   ^
#  726|   }
#  727|   
#  728|-> static ConfigTable autoca_cfg[] = {
#  729|   	{ "userClass", "objectclass", 2, 2, 0,
#  730|   	  ARG_STRING|ARG_MAGIC|ACA_USRCLASS, autoca_cf,

Error: COMPILER_WARNING (CWE-665): [#def477]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/collect.c:54:35: warning[-Wmissing-braces]: missing braces around initializer
#   54 | static ConfigTable collectcfg[] = {
#      |                                   ^
#   52|   static int collect_cf( ConfigArgs *c );
#   53|   
#   54|-> static ConfigTable collectcfg[] = {
#   55|   	{ "collectinfo", "dn> <attribute", 3, 3, 0,
#   56|   	  ARG_MAGIC, collect_cf,

Error: CPPCHECK_WARNING (CWE-562): [#def478]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/collect.c:344: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  342|   						"cannot change virtual attribute '%s'",
#  343|   						ci->ci_ad[idx]->ad_cname.bv_val);
#  344|-> 					rs->sr_text = errMsg;
#  345|   					send_ldap_result( op, rs );
#  346|   					return rs->sr_err;

Error: COMPILER_WARNING (CWE-563): [#def479]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/collect.c: scope_hint: In function ‘collect_response’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/collect.c:366:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  366 |                 int rc;
#      |                     ^~
#  364|   	 */
#  365|   	if ( ci && rs->sr_type == REP_SEARCH ) {
#  366|-> 		int rc;
#  367|   
#  368|   		op->o_bd->bd_info = (BackendInfo *)on->on_info;

Error: COMPILER_WARNING (CWE-665): [#def480]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c:90:38: warning[-Wmissing-braces]: missing braces around initializer
#   90 | static ConfigTable constraintcfg[] = {
#      |                                      ^
#   88|   static ConfigDriver constraint_cf_gen;
#   89|   
#   90|-> static ConfigTable constraintcfg[] = {
#   91|   	{ "constraint_attribute", "attribute[list]> (regex|negregex|uri|set|size|count) <value> [<restrict URI>]",
#   92|   	  4, 0, 0, ARG_MAGIC | CONSTRAINT_ATTRIBUTE, constraint_cf_gen,

Error: COMPILER_WARNING: [#def481]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c:319:98: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 216
#  319 |                                                 "%s %s: Illegal regular expression \"%s\": Error %s",
#      |                                                                                                  ^~
#  320 |                                                 c->argv[0], c->argv[1], c->argv[3], errmsg);
#      |                                                                                     ~~~~~~        
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 41 or more bytes (assuming 1064) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  317|   					ch_free(ap.re);
#  318|   					snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  319|-> 						"%s %s: Illegal regular expression \"%s\": Error %s",
#  320|   						c->argv[0], c->argv[1], c->argv[3], errmsg);
#  321|   					ap.re = NULL;

Error: COMPILER_WARNING (CWE-563): [#def482]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_cf_gen’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c:327:40: warning[-Wunused-variable]: unused variable ‘size’
#  327 |                                 size_t size;
#      |                                        ^~~~
#  325|   				ber_str2bv( c->argv[3], 0, 1, &ap.val );
#  326|   			} else if ( strcasecmp( c->argv[2], SIZE_STR ) == 0 ) {
#  327|-> 				size_t size;
#  328|   				char *endptr;
#  329|   

Error: COMPILER_WARNING (CWE-563): [#def483]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c:335:40: warning[-Wunused-variable]: unused variable ‘count’
#  335 |                                 size_t count;
#      |                                        ^~~~~
#  333|   					rc = ARG_BAD_CONF;
#  334|   			} else if ( strcasecmp( c->argv[2], COUNT_STR ) == 0 ) {
#  335|-> 				size_t count;
#  336|   				char *endptr;
#  337|   

Error: COMPILER_WARNING (CWE-563): [#def484]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_check_count_violation’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c:892:19: warning[-Wunused-variable]: unused variable ‘b’
#  892 |         BerVarray b = NULL;
#      |                   ^
#  890|   constraint_check_count_violation( Modifications *m, Entry *target_entry, constraint *cp )
#  891|   {
#  892|-> 	BerVarray b = NULL;
#  893|   	unsigned ce = 0;
#  894|   	unsigned ca;

Error: COMPILER_WARNING (CWE-563): [#def485]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_update’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/constraint.c:1017:26: warning[-Wunused-variable]: unused variable ‘ce’
# 1017 |                 unsigned ce = 0;
#      |                          ^~
# 1015|   	rc = LDAP_CONSTRAINT_VIOLATION;
# 1016|   	for(;m; m = m->sml_next) {
# 1017|-> 		unsigned ce = 0;
# 1018|   
# 1019|   		if (is_at_operational( m->sml_desc->ad_type )) continue;

Error: COMPILER_WARNING (CWE-665): [#def486]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dds.c:1240:32: warning[-Wmissing-braces]: missing braces around initializer
# 1240 | static ConfigTable dds_cfg[] = {
#      |                                ^
# 1238|   #endif
# 1239|   
# 1240|-> static ConfigTable dds_cfg[] = {
# 1241|   	{ "dds-state", "on|off",
# 1242|   		2, 2, 0, ARG_MAGIC|ARG_ON_OFF|DDS_STATE, dds_cfgen,

Error: CPPCHECK_WARNING (CWE-457): [#def487]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:85: warning[uninitvar]: Uninitialized variable: ap
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def488]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:85:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ap’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:72:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:81:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:82:35: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:85:32: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:85:32: danger: use of uninitialized value ‘ap’ here
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: COMPILER_WARNING (CWE-457): [#def489]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c: scope_hint: In function ‘dgroup_cf’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:85:34: warning[-Wmaybe-uninitialized]: ‘ap’ may be used uninitialized
#   85 |                         *app = ap->ap_next;
#      |                                ~~^~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:79:40: note: ‘ap’ was declared here
#   79 |                         adpair **app, *ap;
#      |                                        ^~
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: COMPILER_WARNING (CWE-665): [#def490]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dyngroup.c:127:34: warning[-Wmissing-braces]: missing braces around initializer
#  127 | static ConfigTable dgroupcfg[] = {
#      |                                  ^
#  125|   }
#  126|   
#  127|-> static ConfigTable dgroupcfg[] = {
#  128|   	{ "attrpair", "member-attribute> <URL-attribute", 3, 3, 0,
#  129|   	  ARG_MAGIC, dgroup_cf,

Error: COMPILER_WARNING (CWE-457): [#def491]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_filter_dup’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1421:17: warning[-Wmaybe-uninitialized]: ‘n’ may be used uninitialized
# 1421 |         Filter *n;
#      |                 ^
# 1419|   dynlist_filter_dup( Operation *op, Filter *f, AttributeDescription *ad, dynlist_search_t *ds )
# 1420|   {
# 1421|-> 	Filter *n;
# 1422|   
# 1423|   	if ( !f )

Error: GCC_ANALYZER_WARNING (CWE-457): [#def492]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1957:60: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘opattrs’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1884:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1887:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1896:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1902:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1902:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1908:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1908:35: branch_true: following ‘true’ branch (when ‘dli’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1913:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1913:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1925:51: branch_true: following ‘true’ branch (when ‘dlm’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1926:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1926:36: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1930:46: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1945:44: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1952:54: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1952:52: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1957:60: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1957:60: danger: use of uninitialized value ‘opattrs’ here
# 1955|   								want |= WANT_MEMBER;
# 1956|   						} else {
# 1957|-> 							if ( opattrs ) {
# 1958|   								if ( dlm->dlm_memberOf_oper ) {
# 1959|   									want |= WANT_MEMBEROF;

Error: COMPILER_WARNING (CWE-457): [#def493]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_search’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1957:60: warning[-Wmaybe-uninitialized]: ‘opattrs’ may be used uninitialized
# 1957 |                                                         if ( opattrs ) {
#      |                                                            ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1882:13: note: ‘opattrs’ was declared here
# 1882 |         int opattrs, userattrs;
#      |             ^~~~~~~
# 1955|   								want |= WANT_MEMBER;
# 1956|   						} else {
# 1957|-> 							if ( opattrs ) {
# 1958|   								if ( dlm->dlm_memberOf_oper ) {
# 1959|   									want |= WANT_MEMBEROF;

Error: COMPILER_WARNING (CWE-457): [#def494]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1964:60: warning[-Wmaybe-uninitialized]: ‘userattrs’ may be used uninitialized
# 1964 |                                                         if ( userattrs ) {
#      |                                                            ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:1882:22: note: ‘userattrs’ was declared here
# 1882 |         int opattrs, userattrs;
#      |                      ^~~~~~~~~
# 1962|   								}
# 1963|   							}
# 1964|-> 							if ( userattrs ) {
# 1965|   								if ( !dlm->dlm_memberOf_oper ) {
# 1966|   									want |= WANT_MEMBEROF;

Error: COMPILER_WARNING (CWE-665): [#def495]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/dynlist.c:2139:30: warning[-Wmissing-braces]: missing braces around initializer
# 2139 | static ConfigTable dlcfg[] = {
#      |                              ^
# 2137|   
# 2138|   /* XXXmanu 255 is the maximum arguments we allow. Can we go beyond? */
# 2139|-> static ConfigTable dlcfg[] = {
# 2140|   	{ "dynlist-attrset", "group-oc> [uri] <URL-ad> <[mapped:]member-ad> [...]",
# 2141|   		3, 0, 0, ARG_MAGIC|DL_ATTRSET, dl_cfgen,

Error: COMPILER_WARNING (CWE-665): [#def496]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:152:35: warning[-Wmissing-braces]: missing braces around initializer
#  152 | static ConfigTable homedircfg[] = {
#      |                                   ^
#  150|   static slap_overinst homedir;
#  151|   
#  152|-> static ConfigTable homedircfg[] = {
#  153|   	{ "homedir-skeleton-path", "pathname", 2, 2, 0,
#  154|   		ARG_STRING|ARG_OFFSET,

Error: COMPILER_WARNING: [#def497]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c: scope_hint: In function ‘traverse_tar_pre’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1292:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 100 equals destination size
# 1292 |                 strncpy( tar->name, ch + 1, 100 );
#      |                 ^
# 1290|   			ch = name + name_len - 100;
# 1291|   		}
# 1292|-> 		strncpy( tar->name, ch + 1, 100 );
# 1293|   		{
# 1294|   			int prefix_len = ( ch - 1 ) - name;

Error: COMPILER_WARNING: [#def498]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1301:33: warning[-Wformat-truncation=]: ‘%06lo’ directive output may be truncated writing between 6 and 11 bytes into a region of size 8
# 1301 |         snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
#      |                                 ^~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1301:32: note: directive argument in the range [0, 4294967295]
# 1301 |         snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
#      |                                ^~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 8 and 13 bytes into a destination of size 8
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1299|   
# 1300|   	snprintf( tar->mode, 8, "%06lo ", (long)st->st_mode & 07777 );
# 1301|-> 	snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
# 1302|   	snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
# 1303|   	snprintf( tar->mtime, 12, "%010lo ", (long)st->st_mtime );

Error: COMPILER_WARNING: [#def499]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c: scope_hint: In function ‘traverse_tar_pre’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1302:33: warning[-Wformat-truncation=]: ‘%06lo’ directive output may be truncated writing between 6 and 11 bytes into a region of size 8
# 1302 |         snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
#      |                                 ^~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1302:32: note: directive argument in the range [0, 4294967295]
# 1302 |         snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
#      |                                ^~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 8 and 13 bytes into a destination of size 8
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1300|   	snprintf( tar->mode, 8, "%06lo ", (long)st->st_mode & 07777 );
# 1301|   	snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
# 1302|-> 	snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
# 1303|   	snprintf( tar->mtime, 12, "%010lo ", (long)st->st_mtime );
# 1304|   	snprintf( tar->size, 12, "%010lo ", (long)0 );

Error: CPPCHECK_WARNING (CWE-457): [#def500]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1855: error[legacyUninitvar]: Uninitialized variable: new_presence
# 1853|   
# 1854|   			} else if ( old_valid && !new_valid &&
# 1855|-> 					!new_presence ) { /* like a del */
# 1856|   				Debug( LDAP_DEBUG_TRACE, "homedir: "
# 1857|   						"homedir_mod_response: treating like a del\n" );

Error: COMPILER_WARNING (CWE-457): [#def501]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c: scope_hint: In function ‘homedir_mod_response’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1880:50: warning[-Wmaybe-uninitialized]: ‘new_presence’ may be used uninitialized
# 1880 |                         } else if ( old_presence || new_presence ) {
#      |                                                  ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/homedir.c:1810:43: note: ‘new_presence’ declared here
# 1810 |                         int old_presence, new_presence;
#      |                                           ^~~~~~~~~~~~
# 1878|   							"homedir_mod_response: nothing to do\n" );
# 1879|   				}
# 1880|-> 			} else if ( old_presence || new_presence ) {
# 1881|   				Debug( LDAP_DEBUG_ANY, "homedir: "
# 1882|   						"homedir_mod_response: <%s> values present "

Error: COMPILER_WARNING (CWE-665): [#def502]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/memberof.c:1759:31: warning[-Wmissing-braces]: missing braces around initializer
# 1759 | static ConfigTable mo_cfg[] = {
#      |                               ^
# 1757|   
# 1758|   
# 1759|-> static ConfigTable mo_cfg[] = {
# 1760|   	{ "memberof-dn", "modifiersName",
# 1761|   		2, 2, 0, ARG_MAGIC|ARG_QUOTE|ARG_DN|MO_DN, mo_cf_gen,

Error: COMPILER_WARNING (CWE-563): [#def503]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/memberof.c: scope_hint: In function ‘memberof_db_open’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/memberof.c:2186:25: warning[-Wunused-variable]: unused variable ‘rc’
# 2186 |         int             rc;
#      |                         ^~
# 2184|   	memberof_t	*mo = (memberof_t *)on->on_bi.bi_private;
# 2185|   	
# 2186|-> 	int		rc;
# 2187|   
# 2188|   	if ( !mo->mo_ad_memberof ) {

Error: COMPILER_WARNING (CWE-665): [#def504]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/nestgroup.c:211:34: warning[-Wmissing-braces]: missing braces around initializer
#  211 | static ConfigTable ngroupcfg[] = {
#      |                                  ^
#  209|   }
#  210|   
#  211|-> static ConfigTable ngroupcfg[] = {
#  212|   	{ "nestgroup-member", "member-ad", 2, 2, 0,
#  213|   	  ARG_MAGIC|ARG_ATDESC|NG_MEMBER, ngroup_cf,

Error: COMPILER_WARNING (CWE-563): [#def505]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/nestgroup.c: scope_hint: In function ‘nestgroup_memberFilter’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/nestgroup.c:428:29: warning[-Wunused-variable]: unused variable ‘j’
#  428 |                         int j;
#      |                             ^
#  426|   		nestgroup_get_parentDNs( &o, &mbr_f[i].nf_f->f_av_value );
#  427|   		if ( gi->gi_numDNs ) {
#  428|-> 			int j;
#  429|   			Filter *f, *nf;
#  430|   			TAvlnode *t;

Error: COMPILER_WARNING (CWE-563): [#def506]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/nestgroup.c: scope_hint: In function ‘nestgroup_memberOfFilter’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/nestgroup.c:544:29: warning[-Wunused-variable]: unused variable ‘j’
#  544 |                         int j;
#      |                             ^
#  542|   
#  543|   		if ( gi.gi_numDNs ) {
#  544|-> 			int j;
#  545|   			Filter *f, *nf;
#  546|   			TAvlnode *t;

Error: COMPILER_WARNING (CWE-457): [#def507]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:761:12: warning[-Wmaybe-uninitialized]: ‘expiry_time’ may be used uninitialized
#  761 |         if ( expiry_time <= slap_get_time()) {
#      |            ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c: scope_hint: In function ‘pcache_db_open2’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:610:25: note: ‘expiry_time’ was declared here
#  610 |         time_t          expiry_time;
#      |                         ^~~~~~~~~~~
#  759|   
#  760|   	/* ignore expired queries */
#  761|-> 	if ( expiry_time <= slap_get_time()) {
#  762|   		Operation	op2 = *op;
#  763|   

Error: CPPCHECK_WARNING (CWE-562): [#def508]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:864: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  862|   	op->o_tag = LDAP_REQ_ADD;
#  863|   	op->o_protocol = LDAP_VERSION3;
#  864|-> 	op->o_callback = &cb;
#  865|   	op->o_time = slap_get_time();
#  866|   	op->o_do_not_cache = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def509]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:1814: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1812|   	op->o_tag = LDAP_REQ_SEARCH;
# 1813|   	op->o_protocol = LDAP_VERSION3;
# 1814|-> 	op->o_callback = &cb;
# 1815|   	op->o_time = slap_get_time();
# 1816|   	op->o_do_not_cache = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def510]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:2140: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2138|   	op->o_ndn = op->o_bd->be_rootndn;
# 2139|   	sc.sc_response = fetch_queryId_cb;
# 2140|-> 	op->o_callback = &sc;
# 2141|   
# 2142|   	for ( s = 0; !BER_BVISNULL( &entryUUIDs[ s ] ); s++ ) {

Error: CPPCHECK_WARNING (CWE-562): [#def511]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:2269: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2267|   	op->o_ndn = op->o_bd->be_rootndn;
# 2268|   	sc.sc_response = fetch_queryId_cb;
# 2269|-> 	op->o_callback = &sc;
# 2270|   
# 2271|   	rc = op->o_bd->be_search( op, &rs );

Error: CPPCHECK_WARNING (CWE-562): [#def512]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:2620: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2618|   		op->o_dn = op->o_bd->be_rootdn;
# 2619|   		op->o_ndn = op->o_bd->be_rootndn;
# 2620|-> 		op->o_callback = &cb;
# 2621|   		Debug( pcache_debug, "pc_setpw: CACHING BIND for %s\n",
# 2622|   			op->o_req_dn.bv_val );

Error: CPPCHECK_WARNING (CWE-562): [#def513]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3424: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3422|   	op->o_tag = LDAP_REQ_SEARCH;
# 3423|   	op->o_protocol = LDAP_VERSION3;
# 3424|-> 	op->o_callback = &cb;
# 3425|   	op->o_do_not_cache = 1;
# 3426|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def514]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3589:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ttl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3522:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3527:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3536:37: branch_true: following ‘true’ branch (when ‘templ’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3538:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3542:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3552:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3555:48: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3556:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3589:37: danger: use of uninitialized value ‘ttl’ here
# 3587|   				expires = query;
# 3588|   				query->qtemp = NULL;
# 3589|-> 			} else if ( !templ->ttr && query->expiry_time > ttl ) {
# 3590|   				/* We don't need to check for refreshes, and this
# 3591|   				 * query's expiry is too new, and all subsequent queries

Error: COMPILER_WARNING (CWE-457): [#def515]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c: scope_hint: In function ‘consistency_check’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3589:49: warning[-Wmaybe-uninitialized]: ‘ttl’ may be used uninitialized
# 3589 |                         } else if ( !templ->ttr && query->expiry_time > ttl ) {
#      |                                     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3537:24: note: ‘ttl’ was declared here
# 3537 |                 time_t ttl;
#      |                        ^~~
# 3587|   				expires = query;
# 3588|   				query->qtemp = NULL;
# 3589|-> 			} else if ( !templ->ttr && query->expiry_time > ttl ) {
# 3590|   				/* We don't need to check for refreshes, and this
# 3591|   				 * query's expiry is too new, and all subsequent queries

Error: COMPILER_WARNING (CWE-665): [#def516]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:3685:30: warning[-Wmissing-braces]: missing braces around initializer
# 3685 | static ConfigTable pccfg[] = {
#      |                              ^
# 3683|   static ConfigCfAdd pc_cfadd;
# 3684|   
# 3685|-> static ConfigTable pccfg[] = {
# 3686|   	{ "pcache", "backend> <max_entries> <numattrsets> <entry limit> "
# 3687|   				"<cycle_time",

Error: COMPILER_WARNING (CWE-563): [#def517]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c: scope_hint: In function ‘pcache_monitor_free’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/pcache.c:5488:25: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 5488 |         int             rc;
#      |                         ^~
# 5486|   	char		textbuf[ SLAP_TEXT_BUFLEN ];
# 5487|   
# 5488|-> 	int		rc;
# 5489|   
# 5490|   	/* NOTE: if slap_shutdown != 0, priv might have already been freed */

Error: COMPILER_WARNING (CWE-665): [#def518]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:451:35: warning[-Wmissing-braces]: missing braces around initializer
#  451 | static ConfigTable ppolicycfg[] = {
#      |                                   ^
#  449|   static ConfigDriver ppolicy_cf_default, ppolicy_cf_checkmod;
#  450|   
#  451|-> static ConfigTable ppolicycfg[] = {
#  452|   	{ "ppolicy_default", "policyDN", 2, 2, 0,
#  453|   	  ARG_DN|ARG_QUOTE|ARG_MAGIC|PPOLICY_DEFAULT, ppolicy_cf_default,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def519]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1168:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bd’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1932:1: enter_function: entry to ‘ppolicy_bind’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1943:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1949:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1952:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1956:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1977:22: call_function: calling ‘ppolicy_get’ from ‘ppolicy_bind’
# 1166|   defaultpol:
# 1167|   	if ( pe ) {
# 1168|-> 		op->o_bd = bd;
# 1169|   		be_entry_release_r( op, pe );
# 1170|   		op->o_bd = bd_orig;

Error: COMPILER_WARNING (CWE-457): [#def520]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_get’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1168:26: warning[-Wmaybe-uninitialized]: ‘bd’ may be used uninitialized
# 1168 |                 op->o_bd = bd;
#      |                 ~~~~~~~~~^~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:958:20: note: ‘bd’ was declared here
#  958 |         BackendDB *bd, *bd_orig = op->o_bd;
#      |                    ^~
# 1166|   defaultpol:
# 1167|   	if ( pe ) {
# 1168|-> 		op->o_bd = bd;
# 1169|   		be_entry_release_r( op, pe );
# 1170|   		op->o_bd = bd_orig;

Error: COMPILER_WARNING (CWE-563): [#def521]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘check_password_quality’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1280:29: warning[-Wunused-variable]: unused variable ‘prog’
# 1280 |                 check_func *prog;
#      |                             ^~~~
# 1278|   	if (pp->pwdUseCheckModule) {
# 1279|   #ifdef SLAPD_MODULES
# 1280|-> 		check_func *prog;
# 1281|   
# 1282|   		if ( !pi->pwdCheckFunc ) {

Error: COMPILER_WARNING: [#def522]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_bind_response’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:1575:95: warning[-Wformat-truncation=]: ‘__snprintf_chk’ output may be truncated before the last format character
# 1575 |         snprintf( timestamp_usec.bv_val + timestamp_usec.bv_len-1, sizeof(".123456Z"), ".%06dZ", now_usec.tt_nsec / 1000 );
#      |                                                                                               ^
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 9 and 10 bytes into a destination of size 9
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1573|   	timestamp_usec.bv_val = nowstr_usec;
# 1574|   	timestamp_usec.bv_len = timestamp.bv_len;
# 1575|-> 	snprintf( timestamp_usec.bv_val + timestamp_usec.bv_len-1, sizeof(".123456Z"), ".%06dZ", now_usec.tt_nsec / 1000 );
# 1576|   	timestamp_usec.bv_len += STRLENOF(".123456");
# 1577|   

Error: COMPILER_WARNING (CWE-563): [#def523]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_account_usability_entry_cb’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/ppolicy.c:2057:22: warning[-Wunused-variable]: unused variable ‘ctrl’
# 2057 |         LDAPControl *ctrl = NULL;
#      |                      ^~~~
# 2055|   	slap_overinst *on = op->o_callback->sc_private;
# 2056|   	BackendInfo *bi = op->o_bd->bd_info;
# 2057|-> 	LDAPControl *ctrl = NULL;
# 2058|   	PassPolicy pp;
# 2059|   	Attribute *a;

Error: COMPILER_WARNING (CWE-665): [#def524]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/refint.c:111:34: warning[-Wmissing-braces]: missing braces around initializer
#  111 | static ConfigTable refintcfg[] = {
#      |                                  ^
#  109|   static ConfigDriver refint_cf_gen;
#  110|   
#  111|-> static ConfigTable refintcfg[] = {
#  112|   	{ "refint_attributes", "attribute...", 2, 0, 0,
#  113|   	  ARG_MAGIC|REFINT_ATTRS, refint_cf_gen,

Error: COMPILER_WARNING (CWE-681): [#def525]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/refint.c: scope_hint: In function ‘refint_search_cb’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/refint.c:562:96: warning[-Wpointer-sign]: pointer targets in passing argument 4 of ‘attr_valfind’ differ in signedness
#  562 |                                         SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH, &rq->oldndn, &i, NULL );
#      |                                                                                                ^~
#      |                                                                                                |
#      |                                                                                                int *
openldap-2.6.9/openldap-2.6.9/include/portable.h:1189: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/refint.c:22: included_from: Included from here.
openldap-2.6.9/openldap-2.6.9/servers/slapd/proto-slap.h:282:19: note: expected ‘unsigned int *’ but argument is of type ‘int *’
#  282 |         unsigned *slot,
#      |         ~~~~~~~~~~^~~~
openldap-2.6.9/openldap-2.6.9/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  560|   				is_exact = attr_valfind( a,
#  561|   					SLAP_MR_EQUALITY|SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH|
#  562|-> 					SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH, &rq->oldndn, &i, NULL );
#  563|   				if ( is_exact == LDAP_SUCCESS ) {
#  564|   					na = op->o_tmpcalloc( 1,

Error: COMPILER_WARNING (CWE-563): [#def526]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/refint.c: scope_hint: In function ‘refint_response’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/refint.c:953:23: warning[-Wunused-variable]: unused variable ‘ip’
#  953 |         refint_attrs *ip;
#      |                       ^~
#  951|   	refint_data *id;
#  952|   	refint_q *rq;
#  953|-> 	refint_attrs *ip;
#  954|   	int ac;
#  955|   

Error: COMPILER_WARNING (CWE-665): [#def527]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:96:38: warning[-Wmissing-braces]: missing braces around initializer
#   96 | static ConfigTable remoteauthcfg[] = {
#      |                                      ^
#   94|   static ConfigDriver remoteauth_cf_gen;
#   95|   
#   96|-> static ConfigTable remoteauthcfg[] = {
#   97|   	{ "remoteauth_mapping", "mapping between domain and realm", 2, 3, 0,
#   98|   		ARG_MAGIC|REMOTE_AUTH_MAPPING,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def528]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:291:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘map’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:272:44: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:285:55: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:286:65: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:290:52: branch_true: following ‘true’ branch (when ‘pmap’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:291:70: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/remoteauth.c:291:70: danger: dereference of NULL ‘map’
#  289|   
#  290|   						if ( pmap ) {
#  291|-> 							pmap->next = map->next;
#  292|   							map->next = NULL;
#  293|   

Error: COMPILER_WARNING (CWE-665): [#def529]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/retcode.c:790:30: warning[-Wmissing-braces]: missing braces around initializer
#  790 | static ConfigTable rccfg[] = {
#      |                              ^
#  788|   static ConfigDriver rc_cf_gen;
#  789|   
#  790|-> static ConfigTable rccfg[] = {
#  791|   	{ "retcode-parent", "dn",
#  792|   		2, 2, 0, ARG_MAGIC|ARG_DN|ARG_QUOTE|RC_PARENT, rc_cf_gen,

Error: COMPILER_WARNING (CWE-563): [#def530]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/rwm.c: scope_hint: In function ‘rwm_op_add’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/rwm.c:280:33: warning[-Wunused-but-set-variable]: variable ‘i’ set but not used
#  280 |                                 i;
#      |                                 ^
#  278|   
#  279|   	int			rc,
#  280|-> 				i;
#  281|   	Attribute		**ap = NULL;
#  282|   	char			*olddn = op->o_req_dn.bv_val;

Error: COMPILER_WARNING (CWE-665): [#def531]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/rwm.c: scope_hint: At top level
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/rwm.c:1946:31: warning[-Wmissing-braces]: missing braces around initializer
# 1946 | static ConfigTable rwmcfg[] = {
#      |                               ^
# 1944|   static ConfigDriver rwm_cf_gen;
# 1945|   
# 1946|-> static ConfigTable rwmcfg[] = {
# 1947|   	{ "rwm-rewrite", "rewrite",
# 1948|   		2, 0, STRLENOF("rwm-rewrite"),

Error: COMPILER_WARNING (CWE-477): [#def532]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/smbk5pwd.c:179:9: warning[-Wdeprecated-declarations]: ‘MD4_Init’ is deprecated: Since OpenSSL 3.0
#  177|   
#  178|   #ifdef HAVE_OPENSSL
#  179|-> 	MD4_Init( &ctx );
#  180|   	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|   	MD4_Final( (unsigned char *)hbuf, &ctx );

Error: COMPILER_WARNING (CWE-477): [#def533]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/smbk5pwd.c:180:9: warning[-Wdeprecated-declarations]: ‘MD4_Update’ is deprecated: Since OpenSSL 3.0
#  178|   #ifdef HAVE_OPENSSL
#  179|   	MD4_Init( &ctx );
#  180|-> 	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|   	MD4_Final( (unsigned char *)hbuf, &ctx );
#  182|   #elif defined(HAVE_GNUTLS)

Error: COMPILER_WARNING (CWE-477): [#def534]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/smbk5pwd.c:181:9: warning[-Wdeprecated-declarations]: ‘MD4_Final’ is deprecated: Since OpenSSL 3.0
#  179|   	MD4_Init( &ctx );
#  180|   	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|-> 	MD4_Final( (unsigned char *)hbuf, &ctx );
#  182|   #elif defined(HAVE_GNUTLS)
#  183|   	md4_init( &ctx );

Error: COMPILER_WARNING (CWE-665): [#def535]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/sssvlv.c:1281:35: warning[-Wmissing-braces]: missing braces around initializer
# 1281 | static ConfigTable sssvlv_cfg[] = {
#      |                                   ^
# 1279|   }
# 1280|   
# 1281|-> static ConfigTable sssvlv_cfg[] = {
# 1282|   	{ "sssvlv-max", "num",
# 1283|   		2, 2, 0, ARG_INT|ARG_OFFSET,

Error: COMPILER_WARNING (CWE-563): [#def536]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findbase’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:500:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  500 |                 int rc;
#      |                     ^~
#  498|   		Operation fop;
#  499|   		SlapReply frs = { REP_RESULT };
#  500|-> 		int rc;
#  501|   
#  502|   		fc->fss->s_flags ^= PS_FIND_BASE;

Error: COMPILER_WARNING (CWE-563): [#def537]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:683:23: warning[-Wunused-but-set-variable]: variable ‘srs’ set but not used
#  683 |         sync_control *srs = NULL;
#      |                       ^~~
#  681|   	AttributeAssertion eq = ATTRIBUTEASSERTION_INIT;
#  682|   	fpres_cookie pcookie;
#  683|-> 	sync_control *srs = NULL;
#  684|   	struct slap_limits_set fc_limits;
#  685|   	int i, rc = LDAP_SUCCESS, findcsn_retry = 1;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def538]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:734:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maxid’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:728:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:734:33: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:734:46: danger: use of uninitialized value ‘maxid’ here
#  732|   			return LDAP_NO_SUCH_OBJECT;
#  733|   		}
#  734|-> 		cf.f_av_value = si->si_ctxcsn[maxid];
#  735|   		fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ),
#  736|   			"(entryCSN>=%s)", cf.f_av_value.bv_val );

Error: COMPILER_WARNING (CWE-457): [#def539]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:734:46: warning[-Wmaybe-uninitialized]: ‘maxid’ may be used uninitialized
#  734 |                 cf.f_av_value = si->si_ctxcsn[maxid];
#      |                                              ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:686:13: note: ‘maxid’ was declared here
#  686 |         int maxid;
#      |             ^~~~~
#  732|   			return LDAP_NO_SUCH_OBJECT;
#  733|   		}
#  734|-> 		cf.f_av_value = si->si_ctxcsn[maxid];
#  735|   		fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ),
#  736|   			"(entryCSN>=%s)", cf.f_av_value.bv_val );

Error: CPPCHECK_WARNING (CWE-562): [#def540]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:1330: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1328|   		if ( !SLAP_ISOVERLAY( op->o_bd )) {
# 1329|   			db = *op->o_bd;
# 1330|-> 			op->o_bd = &db;
# 1331|   		}
# 1332|   		rc = overlay_entry_get_ov( op, fc.fdn, NULL, NULL, 0, &e, on );

Error: COMPILER_WARNING (CWE-563): [#def541]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:2020:21: warning[-Wunused-variable]: unused variable ‘se’
# 2020 |         slog_entry *se;
#      |                     ^~
# 2018|   	BerVarray uuids, csns;
# 2019|   	struct berval uuid[2] = {}, csn[2] = {};
# 2020|-> 	slog_entry *se;
# 2021|   	TAvlnode *entry;
# 2022|   	char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];

Error: COMPILER_WARNING (CWE-563): [#def542]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:2022:14: warning[-Wunused-variable]: unused variable ‘cbuf’
# 2022 |         char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];
#      |              ^~~~
# 2020|   	slog_entry *se;
# 2021|   	TAvlnode *entry;
# 2022|-> 	char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];
# 2023|   	struct berval delcsn[2];
# 2024|   

Error: COMPILER_WARNING (CWE-563): [#def543]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_play_sessionlog’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:2023:23: warning[-Wunused-variable]: unused variable ‘delcsn’
# 2023 |         struct berval delcsn[2];
#      |                       ^~~~~~
# 2021|   	TAvlnode *entry;
# 2022|   	char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];
# 2023|-> 	struct berval delcsn[2];
# 2024|   
# 2025|   	ldap_pvt_thread_rdwr_wlock( &sl->sl_mutex );

Error: COMPILER_WARNING (CWE-457): [#def544]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:2037:20: warning[-Wmaybe-uninitialized]: ‘minsid’ may be used uninitialized
# 2037 |                 if ( minsid < sl->sl_sids[i] ) {
#      |                    ^
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3132:13: note: ‘minsid’ was declared here
# 3132 |         int minsid, maxsid;
#      |             ^~~~~~
# 2035|   	for ( i=0; i<sl->sl_numcsns; i++ ) {
# 2036|   		/* SID not present == new enough */
# 2037|-> 		if ( minsid < sl->sl_sids[i] ) {
# 2038|   			do_play = 1;
# 2039|   			break;

Error: COMPILER_WARNING (CWE-563): [#def545]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_response’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:2467:22: warning[-Wunused-variable]: unused variable ‘sm’
# 2467 |         syncmatches *sm;
#      |                      ^~
# 2465|   	slap_overinst *on = opc->son;
# 2466|   	syncprov_info_t		*si = on->on_bi.bi_private;
# 2467|-> 	syncmatches *sm;
# 2468|   
# 2469|   	if ( rs->sr_err == LDAP_SUCCESS )

Error: COMPILER_WARNING (CWE-563): [#def546]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3251:29: warning[-Wunused-variable]: unused variable ‘sl’
# 3251 |                 sessionlog *sl;
#      |                             ^~
# 3249|   	/* If we have a cookie, handle the PRESENT lookups */
# 3250|   	if ( srs->sr_state.ctxcsn ) {
# 3251|-> 		sessionlog *sl;
# 3252|   		int i, j;
# 3253|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def547]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3357:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maxcsn.bv_val’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3143:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3145:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3145:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3150:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3158:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3235:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3237:12: branch_true: following ‘true’ branch (when ‘numcsns != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3238:60: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3250:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3256:20: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3256:20: branch_false: following ‘false’ branch (when ‘numcsns != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3262:23: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3287:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3307:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3309:32: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3356:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3356:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3357:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3357:25: danger: use of uninitialized value ‘maxcsn.bv_val’ here
# 3355|   		}
# 3356|   		if ( BER_BVISEMPTY( &mincsn )) {
# 3357|-> 			mincsn = maxcsn;
# 3358|   			minsid = maxsid;
# 3359|   		}

Error: COMPILER_WARNING (CWE-665): [#def548]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c: scope_hint: At top level
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/syncprov.c:3695:30: warning[-Wmissing-braces]: missing braces around initializer
# 3695 | static ConfigTable spcfg[] = {
#      |                              ^
# 3693|   static ConfigDriver sp_cf_gen;
# 3694|   
# 3695|-> static ConfigTable spcfg[] = {
# 3696|   	{ "syncprov-checkpoint", "ops> <minutes", 3, 3, 0, ARG_MAGIC|SP_CHKPT,
# 3697|   		sp_cf_gen, "( OLcfgOvAt:1.1 NAME 'olcSpCheckpoint' "

Error: COMPILER_WARNING (CWE-665): [#def549]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:58:39: warning[-Wmissing-braces]: missing braces around initializer
#   58 | static ConfigTable translucentcfg[] = {
#      |                                       ^
#   56|   };
#   57|   
#   58|-> static ConfigTable translucentcfg[] = {
#   59|   	{ "translucent_strict", "on|off", 1, 2, 0,
#   60|   	  ARG_ON_OFF|ARG_OFFSET,

Error: CPPCHECK_WARNING (CWE-562): [#def550]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1273: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1271|   		sc.sc_response = slap_null_cb;
# 1272|   		save_cb = op->o_callback;
# 1273|-> 		op->o_callback = &sc;
# 1274|   	}
# 1275|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def551]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1283:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘save_cb’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1264:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1270:13: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1270:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1276:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1282:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1283:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1283:17: danger: use of uninitialized value ‘save_cb’ here
# 1281|   
# 1282|   	if (ov->bind_local) {
# 1283|-> 		op->o_callback = save_cb;
# 1284|   		if (rc != LDAP_SUCCESS) {
# 1285|   			rc = SLAP_CB_CONTINUE;

Error: COMPILER_WARNING (CWE-457): [#def552]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c: scope_hint: In function ‘translucent_bind’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1283:32: warning[-Wmaybe-uninitialized]: ‘save_cb’ may be used uninitialized
# 1283 |                 op->o_callback = save_cb;
#      |                 ~~~~~~~~~~~~~~~^~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/translucent.c:1258:36: note: ‘save_cb’ was declared here
# 1258 |         slap_callback sc = { 0 }, *save_cb;
#      |                                    ^~~~~~~
# 1281|   
# 1282|   	if (ov->bind_local) {
# 1283|-> 		op->o_callback = save_cb;
# 1284|   		if (rc != LDAP_SUCCESS) {
# 1285|   			rc = SLAP_CB_CONTINUE;

Error: COMPILER_WARNING (CWE-665): [#def553]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/unique.c:89:34: warning[-Wmissing-braces]: missing braces around initializer
#   89 | static ConfigTable uniquecfg[] = {
#      |                                  ^
#   87|   static ConfigDriver unique_cf_uri;
#   88|   
#   89|-> static ConfigTable uniquecfg[] = {
#   90|   	{ "unique_base", "basedn", 2, 2, 0, ARG_DN|ARG_QUOTE|ARG_MAGIC|UNIQUE_BASE,
#   91|   	  unique_cf_base, "( OLcfgOvAt:10.1 NAME 'olcUniqueBase' "

Error: COMPILER_WARNING (CWE-563): [#def554]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/unique.c: scope_hint: In function ‘unique_new_domain’
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/unique.c:335:13: warning[-Wunused-but-set-variable]: variable ‘uri_err’ set but not used
#  335 |         int uri_err = 0;
#      |             ^~~~~~~
#  333|   	char *uri_start;
#  334|   	int rc = LDAP_SUCCESS;
#  335|-> 	int uri_err = 0;
#  336|   	unique_domain * domain;
#  337|   	LDAPURLDesc *url_desc, *url_descs = NULL;

Error: CPPCHECK_WARNING (CWE-562): [#def555]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/unique.c:997: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  995|   	cb.sc_response	= (slap_response*)count_attr_cb;
#  996|   	cb.sc_private	= &uq;
#  997|-> 	nop->o_callback	= &cb;
#  998|   	nop->o_tag	= LDAP_REQ_SEARCH;
#  999|   	nop->ors_scope	= scope;

Error: COMPILER_WARNING (CWE-665): [#def556]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/valsort.c:58:38: warning[-Wmissing-braces]: missing braces around initializer
#   58 | static ConfigTable valsort_cfats[] = {
#      |                                      ^
#   56|   static ConfigDriver valsort_cf_func;
#   57|   
#   58|-> static ConfigTable valsort_cfats[] = {
#   59|   	{ "valsort-attr", "attribute> <dn> <sort-type", 4, 5, 0, ARG_MAGIC,
#   60|   		valsort_cf_func, "( OLcfgOvAt:5.1 NAME 'olcValSortAttr' "

Error: COMPILER_WARNING: [#def557]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def558]
openldap-2.6.9/openldap-2.6.9/servers/slapd/overlays/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: ../liboverlays.a 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-457): [#def559]
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:102:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idNul’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:49:5: enter_function: entry to ‘passwd_extop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:65:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:67:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:74:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:81:22: call_function: calling ‘slap_passwd_parse’ from ‘passwd_extop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:81:22: return_function: returning to ‘passwd_extop’ from ‘slap_passwd_parse’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:84:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:88:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:88:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:88:45: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:94:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:94:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:100:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:101:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:101:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:102:35: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:102:25: danger: use of uninitialized value ‘idNul’ here
#  100|   	if ( rs->sr_err != LDAP_SUCCESS ) {
#  101|   		if ( !BER_BVISNULL( &id ))
#  102|-> 			id.bv_val[id.bv_len] = idNul;
#  103|   		return rs->sr_err;
#  104|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def560]
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:108:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idNul’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:49:5: enter_function: entry to ‘passwd_extop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:65:9: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:67:11: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:74:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:81:22: call_function: calling ‘slap_passwd_parse’ from ‘passwd_extop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:81:22: return_function: returning to ‘passwd_extop’ from ‘slap_passwd_parse’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:84:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:88:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:88:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:88:45: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:89:17: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:100:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:106:15: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:106:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:107:68: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:108:17: danger: use of uninitialized value ‘idNul’ here
#  106|   	if ( !BER_BVISEMPTY( &id ) ) {
#  107|   		rs->sr_err = dnPrettyNormal( NULL, &id, &dn, &ndn, op->o_tmpmemctx );
#  108|-> 		id.bv_val[id.bv_len] = idNul;
#  109|   		if ( rs->sr_err != LDAP_SUCCESS ) {
#  110|   			rs->sr_text = "Invalid DN";

Error: COMPILER_WARNING (CWE-457): [#def561]
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c: scope_hint: In function ‘passwd_extop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:108:38: warning[-Wmaybe-uninitialized]: ‘idNul’ may be used uninitialized
#  108 |                 id.bv_val[id.bv_len] = idNul;
#      |                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:59:24: note: ‘idNul’ was declared here
#   59 |         char **hashes, idNul;
#      |                        ^~~~~
#  106|   	if ( !BER_BVISEMPTY( &id ) ) {
#  107|   		rs->sr_err = dnPrettyNormal( NULL, &id, &dn, &ndn, op->o_tmpmemctx );
#  108|-> 		id.bv_val[id.bv_len] = idNul;
#  109|   		if ( rs->sr_err != LDAP_SUCCESS ) {
#  110|   			rs->sr_text = "Invalid DN";

Error: CPPCHECK_WARNING (CWE-562): [#def562]
openldap-2.6.9/openldap-2.6.9/servers/slapd/passwd.c:297: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  295|   
#  296|   		op->o_tag = LDAP_REQ_MODIFY;
#  297|-> 		op->o_callback = &cb;
#  298|   		op->orm_modlist = qpw->rs_mods;
#  299|   		op->orm_no_opattrs = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def563]
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e_flags’
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1044:16: release_memory: ‘e_flags’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1073:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1077:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1090:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1099:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1133:12: branch_false: following ‘false’ branch (when ‘rc != -1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1145:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1194:49: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1195:39: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1200:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1224:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1224:20: branch_false: following ‘false’ branch (when ‘attrsonly == 0’)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1249:38: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1250:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1250:36: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:36: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:63: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1261:56: danger: dereference of NULL ‘e_flags + (long unsigned int)j * 8’
# 1259|   				}
# 1260|   
# 1261|-> 				if ( op->o_vrFilter && e_flags[j][i] == 0 ){
# 1262|   					continue;
# 1263|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def564]
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e_flags’
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1044:16: release_memory: ‘e_flags’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1073:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1077:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1090:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1099:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1133:12: branch_false: following ‘false’ branch (when ‘rc != -1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1145:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1361:49: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1362:39: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1366:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1389:24: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1389:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1400:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1401:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1413:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1413:20: branch_true: following ‘true’ branch (when ‘attrsonly == 0’)...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1414:38: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1415:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1415:36: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:36: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:63: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/result.c:1426:56: danger: dereference of NULL ‘e_flags + (long unsigned int)j * 8’
# 1424|   				}
# 1425|   
# 1426|-> 				if ( op->o_vrFilter && e_flags[j][i] == 0 ){
# 1427|   					continue;
# 1428|   				}

Error: COMPILER_WARNING (CWE-563): [#def565]
openldap-2.6.9/openldap-2.6.9/servers/slapd/root_dse.c: scope_hint: In function ‘root_dse_info’
openldap-2.6.9/openldap-2.6.9/servers/slapd/root_dse.c:189:28: warning[-Wunused-variable]: unused variable ‘j’
#  189 |         int             i, j;
#      |                            ^
#  187|   	struct berval *bv;
#  188|   #endif
#  189|-> 	int		i, j;
#  190|   	char ** supportedSASLMechanisms;
#  191|   	BackendDB *be;

Error: COMPILER_WARNING: [#def566]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c: scope_hint: In function ‘authzValidate’
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:318:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 8192 equals destination size
#  318 |                 strncpy( buf, in->bv_val, sizeof( buf ) );
#      |                 ^
#  316|   		id.bv_len = in->bv_len;
#  317|   		id.bv_val = buf;
#  318|-> 		strncpy( buf, in->bv_val, sizeof( buf ) );
#  319|   
#  320|   		rc = slap_parse_user( &id, &user, &realm, &mech );

Error: COMPILER_WARNING: [#def567]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c: scope_hint: In function ‘authzPrettyNormal’
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:630:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 8192 equals destination size
#  630 |                 strncpy( buf, val->bv_val, sizeof( buf ) );
#      |                 ^
#  628|   		id.bv_len = val->bv_len;
#  629|   		id.bv_val = buf;
#  630|-> 		strncpy( buf, val->bv_val, sizeof( buf ) );
#  631|   
#  632|   		rc = slap_parse_user( &id, &user, &realm, &mech );

Error: COMPILER_WARNING: [#def568]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c: scope_hint: In function ‘slap_parseURI’
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1062:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 8192 equals destination size
# 1062 |                 strncpy( buf, uri->bv_val, sizeof( buf ) );
#      |                 ^
# 1060|   		id.bv_len = uri->bv_len;
# 1061|   		id.bv_val = buf;
# 1062|-> 		strncpy( buf, uri->bv_val, sizeof( buf ) );
# 1063|   
# 1064|   		rc = slap_parse_user( &id, &user, &realm, &mech );

Error: COMPILER_WARNING (CWE-563): [#def569]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1353:18: warning[-Wunused-variable]: unused variable ‘line’
# 1353 |         char    *line;
#      |                  ^~~~
# 1351|   {
# 1352|   	int	rc, i, last;
# 1353|-> 	char	*line;
# 1354|   	struct berval bv;
# 1355|   	struct rewrite_info *rw = sasl_rwinfo;

Error: COMPILER_WARNING (CWE-563): [#def570]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c: scope_hint: In function ‘slap_sasl_rewrite_config’
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1354:23: warning[-Wunused-variable]: unused variable ‘bv’
# 1354 |         struct berval bv;
#      |                       ^~
# 1352|   	int	rc, i, last;
# 1353|   	char	*line;
# 1354|-> 	struct berval bv;
# 1355|   	struct rewrite_info *rw = sasl_rwinfo;
# 1356|   

Error: CPPCHECK_WARNING (CWE-457): [#def571]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1442: warning[uninitvar]: Uninitialized variable: rc
# 1440|   	}
# 1441|   
# 1442|-> 	return rc;
# 1443|   }
# 1444|   

Error: CPPCHECK_WARNING (CWE-909): [#def572]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1528: error[uninitStructMember]: Uninitialized struct member: sr.sr_match
# 1526|   		}
# 1527|   
# 1528|-> 		SaslRegexp[i] = sr;
# 1529|   		SaslRegexp[i].sr_match = ch_strdup( match );
# 1530|   		SaslRegexp[i].sr_replace = ch_strdup( replace );

Error: CPPCHECK_WARNING (CWE-909): [#def573]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1528: error[uninitStructMember]: Uninitialized struct member: sr.sr_replace
# 1526|   		}
# 1527|   
# 1528|-> 		SaslRegexp[i] = sr;
# 1529|   		SaslRegexp[i].sr_match = ch_strdup( match );
# 1530|   		SaslRegexp[i].sr_replace = ch_strdup( replace );

Error: CPPCHECK_WARNING (CWE-457): [#def574]
openldap-2.6.9/openldap-2.6.9/servers/slapd/saslauthz.c:1528: error[uninitvar]: Uninitialized variable: sr
# 1526|   		}
# 1527|   
# 1528|-> 		SaslRegexp[i] = sr;
# 1529|   		SaslRegexp[i].sr_match = ch_strdup( match );
# 1530|   		SaslRegexp[i].sr_replace = ch_strdup( replace );

Error: CPPCHECK_WARNING (CWE-457): [#def575]
openldap-2.6.9/openldap-2.6.9/servers/slapd/schema_init.c:1366: warning[uninitvar]: Uninitialized variable: &uid.bv_len
# 1364|   	/* if there's a "#", try bitStringValidate()... */
# 1365|   	uid.bv_val = strrchr( dn.bv_val, '#' );
# 1366|-> 	if ( !BER_BVISNULL( &uid ) ) {
# 1367|   		uid.bv_val++;
# 1368|   		uid.bv_len = dn.bv_len - ( uid.bv_val - dn.bv_val );

Error: CPPCHECK_WARNING (CWE-457): [#def576]
openldap-2.6.9/openldap-2.6.9/servers/slapd/schema_init.c:2728: warning[uninitvar]: Uninitialized variable: rc
# 2726|   		slap_sl_free( itmp.bv_val, ctx );
# 2727|   	}
# 2728|-> 	return rc;
# 2729|   }
# 2730|   

Error: CPPCHECK_WARNING (CWE-758): [#def577]
openldap-2.6.9/openldap-2.6.9/servers/slapd/schema_init.c:3597: warning[objectIndex]: The address of variable 'zero' might be accessed at non-zero index.
# 3595|   	}
# 3596|   	for ( ; i < len; i++ ) {
# 3597|-> 		sprintf( sptr, "%02X", ptr[i] );
# 3598|   		sptr += 2;
# 3599|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def578]
openldap-2.6.9/openldap-2.6.9/servers/slapd/schema_init.c:5303: error[uninitvar]: Uninitialized variable: bv.bv_val
# 5301|   	bv.bv_val = buf;
# 5302|   
# 5303|-> 	ptr = bv.bv_val;
# 5304|   	ptr = lutil_strncopy( ptr, gt.bv_val, STRLENOF( "YYYYmmddHH" ) );
# 5305|   	ptr = lutil_strncopy( ptr, &gt.bv_val[ STRLENOF( "YYYYmmddHH:" ) ],

Error: CPPCHECK_WARNING (CWE-457): [#def579]
openldap-2.6.9/openldap-2.6.9/servers/slapd/schema_init.c:5400: error[uninitvar]: Uninitialized variable: bv.bv_val
# 5398|   	bv.bv_val = buf;
# 5399|   
# 5400|-> 	ptr = bv.bv_val;
# 5401|   	ptr = lutil_strncopy( ptr, gt.bv_val, gt.bv_len - 1 );
# 5402|   	ptr = lutil_strcopy( ptr, ".000000Z#" );

Error: CPPCHECK_WARNING (CWE-457): [#def580]
openldap-2.6.9/openldap-2.6.9/servers/slapd/sl_malloc.c:673: error[legacyUninitvar]: Uninitialized variable: memctx
#  671|   	if ( slapMode & SLAP_TOOL_MODE ) return NULL;
#  672|   
#  673|-> 	sh = GET_MEMCTX(ldap_pvt_thread_pool_context(), &memctx);
#  674|   	if (sh && ptr >= sh->sh_base && ptr <= sh->sh_end) {
#  675|   		return sh;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def581]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:126:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘prev_DN_strict’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:330:1: enter_function: entry to ‘getrec’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:333:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:334:24: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:334:24: call_function: calling ‘getrec0’ from ‘getrec’
#  124|   		e = str2entry2( buf, checkvals );
#  125|   		if ( !dbnum ) {
#  126|-> 			slap_DN_strict = prev_DN_strict;
#  127|   		}
#  128|   

Error: COMPILER_WARNING (CWE-457): [#def582]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c: scope_hint: In function ‘getrec0’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:126:40: warning[-Wmaybe-uninitialized]: ‘prev_DN_strict’ may be used uninitialized
#  126 |                         slap_DN_strict = prev_DN_strict;
#      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapadd.c:115:21: note: ‘prev_DN_strict’ was declared here
#  115 |                 int prev_DN_strict;
#      |                     ^~~~~~~~~~~~~~
#  124|   		e = str2entry2( buf, checkvals );
#  125|   		if ( !dbnum ) {
#  126|-> 			slap_DN_strict = prev_DN_strict;
#  127|   		}
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def583]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:203:30: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:276:1: enter_function: entry to ‘slap_tool_init’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:284:23: release_memory: ‘base.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:368:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:369:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:494:30: call_function: calling ‘parse_slapopt’ from ‘slap_tool_init’
#  201|   		switch ( tool ) {
#  202|   		case SLAPADD:
#  203|-> 			if ( strcasecmp( p, "yes" ) == 0 ) {
#  204|   				*mode &= ~SLAP_TOOL_NO_SCHEMA_CHECK;
#  205|   			} else if ( strcasecmp( p, "no" ) == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def584]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:221:30: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:276:1: enter_function: entry to ‘slap_tool_init’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:284:23: release_memory: ‘base.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:368:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:369:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapcommon.c:494:30: call_function: calling ‘parse_slapopt’ from ‘slap_tool_init’
#  219|   		switch ( tool ) {
#  220|   		case SLAPADD:
#  221|-> 			if ( strcasecmp( p, "yes" ) == 0 ) {
#  222|   				*mode |= SLAP_TOOL_VALUE_CHECK;
#  223|   			} else if ( strcasecmp( p, "no" ) == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def585]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:82:33: warning[-Wanalyzer-null-argument]: use of NULL ‘pdn.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:49:17: branch_true: following ‘true’ branch (when ‘argc != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:51:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:51:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:52:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:70:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:80:34: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:82:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:82:33: danger: argument 1 (‘pdn.bv_val’) NULL where non-null expected
#argument 1 of ‘__builtin_puts’ must be non-null
#   80|   			switch ( dn_mode ) {
#   81|   			case SLAP_TOOL_LDAPDN_PRETTY:
#   82|-> 				printf( "%s\n", pdn.bv_val );
#   83|   				break;
#   84|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def586]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:86:33: warning[-Wanalyzer-null-argument]: use of NULL ‘ndn.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:49:17: branch_true: following ‘true’ branch (when ‘argc != 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:51:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:51:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:52:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:70:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:80:34: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:86:33: release_memory: ‘ndn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapdn.c:86:33: danger: argument 1 (‘ndn.bv_val’) NULL where non-null expected
#argument 1 of ‘__builtin_puts’ must be non-null
#   84|   
#   85|   			case SLAP_TOOL_LDAPDN_NORMAL:
#   86|-> 				printf( "%s\n", ndn.bv_val );
#   87|   				break;
#   88|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def587]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:171:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pSavePB’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:158:9: branch_true: following ‘true’ branch (when ‘be’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:160:18: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:161:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:164:25: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:164:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:164:25: branch_false: following ‘false’ branch (when ‘index >= 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:165:48: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:165:33: branch_false: following ‘false’ branch (when ‘pos >= index’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:170:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:170:20: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:171:30: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:171:30: danger: use of uninitialized value ‘pSavePB’ here
#  169|   
#  170|   		if ( rc == LDAP_SUCCESS ) { 
#  171|-> 			rc = slapi_pblock_set( pSavePB, SLAPI_IBM_PBLOCK, (void *)pPB ); 
#  172|   		}
#  173|   	}

Error: COMPILER_WARNING (CWE-457): [#def588]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c: scope_hint: In function ‘slapi_int_register_plugin_index’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:171:30: warning[-Wmaybe-uninitialized]: ‘pSavePB’ may be used uninitialized
#  171 |                         rc = slapi_pblock_set( pSavePB, SLAPI_IBM_PBLOCK, (void *)pPB );
#      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/plugin.c:155:26: note: ‘pSavePB’ was declared here
#  155 |         Slapi_PBlock    *pSavePB;
#      |                          ^~~~~~~
#  169|   
#  170|   		if ( rc == LDAP_SUCCESS ) { 
#  171|-> 			rc = slapi_pblock_set( pSavePB, SLAPI_IBM_PBLOCK, (void *)pPB ); 
#  172|   		}
#  173|   	}

Error: COMPILER_WARNING (CWE-252): [#def589]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/printmsg.c: scope_hint: In function ‘slapi_int_log_error’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/printmsg.c:107:17: warning[-Wunused-result]: ignoring return value of ‘lockf’ declared with attribute ‘warn_unused_result’
#  107 |                 lockf( fileno( fp ), F_ULOCK, 0 );
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  105|   		UnlockFile( fhandle, 0, 0, UINT_MAX, UINT_MAX );
#  106|   #else
#  107|-> 		lockf( fileno( fp ), F_ULOCK, 0 );
#  108|   #endif
#  109|   

Error: CPPCHECK_WARNING (CWE-457): [#def590]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/slapi_utils.c:2906: error[legacyUninitvar]: Uninitialized variable: tmpPlugin
# 2904|   	slapi_compute_callback_t *pGetPlugin, *tmpPlugin;
# 2905|   
# 2906|-> 	rc = slapi_int_get_plugins( frontendDB, SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN, (SLAPI_FUNC **)&tmpPlugin );
# 2907|   	if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) {
# 2908|   		/* Nothing to do; front-end should ignore. */

Error: COMPILER_WARNING: [#def591]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def592]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapi/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: libslapi.la 2.6.9 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def593]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:61:13: warning[-Wunused-but-set-variable]: variable ‘checkvals’ set but not used
#   61 |         int checkvals, ldifrc;
#      |             ^~~~~~~~~
#   59|   	Operation *op;
#   60|   
#   61|-> 	int checkvals, ldifrc;
#   62|   	unsigned long lineno, nextline;
#   63|   	int lmax;

Error: COMPILER_WARNING (CWE-563): [#def594]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:145:21: warning[-Wunused-but-set-variable]: variable ‘is_oc’ set but not used
#  145 |                 int is_oc = 0;
#      |                     ^~~~~
#  143|   		struct berval ndn = BER_BVNULL;
#  144|   		int n;
#  145|-> 		int is_oc = 0;
#  146|   		int local_rc;
#  147|   		int mod_err = 0;

Error: COMPILER_WARNING (CWE-563): [#def595]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c: scope_hint: In function ‘slapmodify’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:147:21: warning[-Wunused-variable]: unused variable ‘mod_err’
#  147 |                 int mod_err = 0;
#      |                     ^~~~~~~
#  145|   		int is_oc = 0;
#  146|   		int local_rc;
#  147|-> 		int mod_err = 0;
#  148|   		char *request = "(unknown)";
#  149|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def596]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:595:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘id’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:73:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:74:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:90:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:91:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:136:24: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:143:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:152:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:155:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:155:20: branch_false: following ‘false’ branch (when ‘enable_meter == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:163:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:170:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:178:26: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:207:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:215:21: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:244:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:274:26: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:295:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:302:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:302:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:463:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:566:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:567:34: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:584:27: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:592:31: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:594:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:595:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:595:33: danger: use of uninitialized value ‘id’ here
#  593|   
#  594|   			if ( verbose )
#  595|-> 				fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#  596|   					request, ndn.bv_val, (long) id );
#  597|   		} else {

Error: COMPILER_WARNING (CWE-457): [#def597]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:595:33: warning[-Wmaybe-uninitialized]: ‘id’ may be used uninitialized
#  595 |                                 fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  596 |                                         request, ndn.bv_val, (long) id );
#      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:57:12: note: ‘id’ was declared here
#   57 |         ID id;
#      |            ^~
#  593|   
#  594|   			if ( verbose )
#  595|-> 				fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#  596|   					request, ndn.bv_val, (long) id );
#  597|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def598]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:624:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘sid’
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:73:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:74:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:90:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:91:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:618:12: branch_false: following ‘false’ branch (when ‘enable_meter == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:623:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:623:12: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:624:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:624:22: danger: use of uninitialized value ‘sid’ here
#  622|   
#  623|   	if ( rc == EXIT_SUCCESS ) {
#  624|-> 		rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#  625|   	}
#  626|   

Error: COMPILER_WARNING (CWE-457): [#def599]
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:624:22: warning[-Wmaybe-uninitialized]: ‘sid’ may be used uninitialized
#  624 |                 rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/slapmodify.c:55:23: note: ‘sid’ was declared here
#   55 |         unsigned long sid;
#      |                       ^~~
#  622|   
#  623|   	if ( rc == EXIT_SUCCESS ) {
#  624|-> 		rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#  625|   	}
#  626|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def600]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:443:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘attrs’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7227:1: enter_function: entry to ‘add_syncrepl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7233:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7239:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7244:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7246:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7251:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7261:9: release_memory: ‘0’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7264:9: release_memory: ‘0’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7281:14: call_function: calling ‘parse_syncrepl_line’ from ‘add_syncrepl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7281:14: return_function: returning to ‘add_syncrepl’ from ‘parse_syncrepl_line’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7283:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7287:26: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7303:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7311:29: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7312:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7317:31: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7335:33: call_function: calling ‘init_syncrepl’ from ‘add_syncrepl’
#  441|   			attrs[i++] = ch_strdup( sync_descs[0]->ad_cname.bv_val );
#  442|   		}
#  443|-> 		attrs[i] = NULL;
#  444|   	}
#  445|   

Error: COMPILER_WARNING (CWE-563): [#def601]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘check_syncprov’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:937:16: warning[-Wunused-variable]: unused variable ‘j’
#  937 |         int i, j, changed = 0;
#      |                ^
#  935|   	Entry e = {0};
#  936|   	SlapReply rs = {REP_SEARCH};
#  937|-> 	int i, j, changed = 0;
#  938|   
#  939|   	/* Look for contextCSN from syncprov overlay. If

Error: COMPILER_WARNING (CWE-457): [#def602]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:1387:46: warning[-Wmaybe-uninitialized]: ‘entry’ may be used uninitialized
# 1387 |                                         rc = syncrepl_entry( si, op, entry, &modlist, syncstate, syncUUID, NULL );
#      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘do_syncrepl’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:1372:42: note: ‘entry’ declared here
# 1372 |                 Entry                   *entry;
#      |                                          ^~~~~
# 1385|   				rc = syncrepl_dirsync_message( si, op, msg, &modlist, &entry, &syncstate, syncUUID );
# 1386|   				if ( rc == 0 )
# 1387|-> 					rc = syncrepl_entry( si, op, entry, &modlist, syncstate, syncUUID, NULL );
# 1388|   				op->o_tmpfree( syncUUID[0].bv_val, op->o_tmpmemctx );
# 1389|   				if ( modlist )

Error: CPPCHECK_WARNING (CWE-562): [#def603]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3214: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3212|   	}
# 3213|   
# 3214|-> 	op->o_callback = &cb;
# 3215|   	slap_op_time( &op->o_time, &op->o_tincr );
# 3216|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def604]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3445:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syncUUID’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3391:1: enter_function: entry to ‘syncrepl_message_to_entry’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3416:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3423:9: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3426:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3433:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3440:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3444:81: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3444:23: call_function: calling ‘slap_uuidstr_from_normalized’ from ‘syncrepl_message_to_entry’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3444:23: return_function: returning to ‘syncrepl_message_to_entry’ from ‘slap_uuidstr_from_normalized’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3445:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3445:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3445:17: danger: dereference of NULL ‘syncUUID’
# 3443|   		 */
# 3444|   		(void)slap_uuidstr_from_normalized( &syncUUID[1], &syncUUID[0], op->o_tmpmemctx );
# 3445|-> 		Debug( LDAP_DEBUG_SYNC,
# 3446|   			"syncrepl_message_to_entry: %s DN: %s, UUID: %s\n",
# 3447|   			si->si_ridtxt, bdn.bv_val, syncUUID[1].bv_val );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def605]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3708:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syncUUID’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3609:1: enter_function: entry to ‘syncrepl_dirsync_message’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3635:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3642:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3643:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3650:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3657:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3658:39: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3660:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3661:41: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3660:22: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3665:22: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3680:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3686:17: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3688:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3702:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3703:72: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3707:31: call_function: calling ‘slap_uuidstr_from_normalized’ from ‘syncrepl_dirsync_message’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3707:31: return_function: returning to ‘syncrepl_dirsync_message’ from ‘slap_uuidstr_from_normalized’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3708:25: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3708:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3708:25: danger: dereference of NULL ‘syncUUID’
# 3706|   			 */
# 3707|   			(void)slap_uuidstr_from_normalized( &syncUUID[1], &syncUUID[0], op->o_tmpmemctx );
# 3708|-> 			Debug( LDAP_DEBUG_SYNC,
# 3709|   				"syncrepl_dirsync_message: %s DN: %s, UUID: %s\n",
# 3710|   				si->si_ridtxt, bdn.bv_val, syncUUID[1].bv_val );

Error: CPPCHECK_WARNING (CWE-562): [#def606]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:3895: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3893|   		cb.sc_private = si;
# 3894|   
# 3895|-> 		op->o_callback = &cb;
# 3896|   		op->o_req_dn = si->si_contextdn;
# 3897|   		op->o_req_ndn = si->si_contextdn;

Error: CPPCHECK_WARNING (CWE-562): [#def607]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4208: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4206|   
# 4207|   	/* set callback function */
# 4208|-> 	op->o_callback = &cb;
# 4209|   	cb.sc_response = dn_callback;
# 4210|   	cb.sc_private = &dni;

Error: CPPCHECK_WARNING (CWE-562): [#def608]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4668: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4666|   					op->o_req_dn = pdn;
# 4667|   					op->o_req_ndn = pdn;
# 4668|-> 					op->o_callback = &cb;
# 4669|   					rs_reinit( &rs_delete, REP_RESULT );
# 4670|   					op->o_bd->be_delete( op, &rs_delete );

Error: CPPCHECK_WARNING (CWE-562): [#def609]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4745: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4743|   	cb.sc_private = si;
# 4744|   
# 4745|-> 	op->o_callback = &cb;
# 4746|   	op->o_tag = LDAP_REQ_SEARCH;
# 4747|   	op->ors_scope = si->si_scope;

Error: COMPILER_WARNING (CWE-563): [#def610]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_del_nonpresent’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4783:25: warning[-Wunused-but-set-variable]: variable ‘cf’ set but not used
# 4783 |                 Filter *cf, *of;
#      |                         ^~
# 4781|   		si->si_refreshDelete ^= NP_DELETE_ONE;
# 4782|   	} else {
# 4783|-> 		Filter *cf, *of;
# 4784|   		Filter mmf[2];
# 4785|   		AttributeAssertion mmaa;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def611]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: warning[-Wanalyzer-null-argument]: use of NULL ‘pdn.bv_val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4730:23: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4730:23: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4753:12: branch_false: following ‘false’ branch (when ‘uuids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4786:27: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4803:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4808:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4817:25: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4818:36: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:36: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4819:38: danger: argument 2 (‘mmaa.aa_value.bv_val’) NULL where non-null expected
# 4817|   			BER_BVZERO( &f->f_av_value );
# 4818|   			for ( i=0; i<sc->numcsns; i++ ) {
# 4819|-> 				if ( ber_bvcmp( &sc->ctxcsn[i], &f->f_av_value ) > 0 )
# 4820|   					f->f_av_value = sc->ctxcsn[i];
# 4821|   			}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def612]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4834:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘of’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4753:12: branch_false: following ‘false’ branch (when ‘uuids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4786:27: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4803:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4827:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4833:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4834:25: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4834:25: danger: use of uninitialized value ‘of’ here
# 4832|   		rc = be->be_search( op, &rs_search );
# 4833|   		if ( SLAP_MULTIPROVIDER( op->o_bd )) {
# 4834|-> 			op->ors_filter = of;
# 4835|   		}
# 4836|   		if ( op->ors_filter ) filter_free_x( op, op->ors_filter, 1 );

Error: COMPILER_WARNING (CWE-457): [#def613]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_del_nonpresent’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4834:40: warning[-Wmaybe-uninitialized]: ‘of’ may be used uninitialized
# 4834 |                         op->ors_filter = of;
#      |                         ~~~~~~~~~~~~~~~^~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4783:30: note: ‘of’ was declared here
# 4783 |                 Filter *cf, *of;
#      |                              ^~
# 4832|   		rc = be->be_search( op, &rs_search );
# 4833|   		if ( SLAP_MULTIPROVIDER( op->o_bd )) {
# 4834|-> 			op->ors_filter = of;
# 4835|   		}
# 4836|   		if ( op->ors_filter ) filter_free_x( op, op->ors_filter, 1 );

Error: CPPCHECK_WARNING (CWE-562): [#def614]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4869: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4867|   			np_list = LDAP_LIST_NEXT( np_list, npe_link );
# 4868|   			op->o_tag = LDAP_REQ_DELETE;
# 4869|-> 			op->o_callback = &cb;
# 4870|   			cb.sc_response = syncrepl_null_callback;
# 4871|   			cb.sc_private = si;

Error: CPPCHECK_WARNING (CWE-562): [#def615]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4927: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4925|   					op->o_req_dn = pdn;
# 4926|   					op->o_req_ndn = pdn;
# 4927|-> 					op->o_callback = &cb;
# 4928|   					rs_reinit( &rs_delete, REP_RESULT );
# 4929|   					/* give it a root privil ? */

Error: CPPCHECK_WARNING (CWE-562): [#def616]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4975: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4973|   
# 4974|   	op->o_tag = LDAP_REQ_ADD;
# 4975|-> 	op->o_callback = &cb;
# 4976|   	cb.sc_response = syncrepl_null_callback;
# 4977|   	cb.sc_private = NULL;

Error: COMPILER_WARNING: [#def617]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_add_glue_ancestors’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4975:24: warning[-Wdangling-pointer=]: storing the address of local variable ‘cb’ in ‘op_111(D)->o_callback’
# 4975 |         op->o_callback = &cb;
#      |         ~~~~~~~~~~~~~~~^~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4963:23: note: ‘cb’ declared here
# 4963 |         slap_callback cb = { NULL };
#      |                       ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:4959:20: note: ‘op’ declared here
# 4959 |         Operation* op,
#      |         ~~~~~~~~~~~^~
# 4973|   
# 4974|   	op->o_tag = LDAP_REQ_ADD;
# 4975|-> 	op->o_callback = &cb;
# 4976|   	cb.sc_response = syncrepl_null_callback;
# 4977|   	cb.sc_private = NULL;

Error: CPPCHECK_WARNING (CWE-562): [#def618]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5117: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5115|   
# 5116|   	op->o_tag = LDAP_REQ_ADD;
# 5117|-> 	op->o_callback = &cb;
# 5118|   	cb.sc_response = syncrepl_null_callback;
# 5119|   	cb.sc_private = NULL;

Error: COMPILER_WARNING (CWE-563): [#def619]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_dsee_update’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5143:23: warning[-Wunused-variable]: unused variable ‘first’
# 5143 |         struct berval first = BER_BVNULL;
#      |                       ^~~~~
# 5141|   	Backend *be = op->o_bd;
# 5142|   	Modifications mod;
# 5143|-> 	struct berval first = BER_BVNULL;
# 5144|   	slap_callback cb = { NULL };
# 5145|   	SlapReply	rs_modify = {REP_RESULT};

Error: CPPCHECK_WARNING (CWE-562): [#def620]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5172: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5170|   	cb.sc_private = si;
# 5171|   
# 5172|-> 	op->o_callback = &cb;
# 5173|   	op->o_req_dn = si->si_contextdn;
# 5174|   	op->o_req_ndn = si->si_contextdn;

Error: CPPCHECK_WARNING (CWE-562): [#def621]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5297: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5295|   	cb.sc_private = si;
# 5296|   
# 5297|-> 	op->o_callback = &cb;
# 5298|   	op->o_req_dn = si->si_contextdn;
# 5299|   	op->o_req_ndn = si->si_contextdn;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def622]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5811:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘is_ctx’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5676:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5677:23: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5677:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5682:71: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5688:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5695:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5695:36: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5741:41: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5799:36: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5810:80: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5811:41: danger: use of uninitialized value ‘is_ctx’ here
# 5809|   				{
# 5810|   					Attribute *old = attrs_exdup( op, dni, rs->sr_entry->e_attrs );
# 5811|-> 					syncrepl_diff_entry( op, old,
# 5812|   						dni->new_entry->e_attrs, &dni->mods, dni->modlist,
# 5813|   						is_ctx );

Error: COMPILER_WARNING (CWE-457): [#def623]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘dn_callback’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5811:41: warning[-Wmaybe-uninitialized]: ‘is_ctx’ may be used uninitialized
# 5811 |                                         syncrepl_diff_entry( op, old,
#      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 5812 |                                                 dni->new_entry->e_attrs, &dni->mods, dni->modlist,
#      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 5813 |                                                 is_ctx );
#      |                                                 ~~~~~~~~
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:5692:37: note: ‘is_ctx’ was declared here
# 5692 |                                 int is_ctx, new_sup = 0;
#      |                                     ^~~~~~
# 5809|   				{
# 5810|   					Attribute *old = attrs_exdup( op, dni, rs->sr_entry->e_attrs );
# 5811|-> 					syncrepl_diff_entry( op, old,
# 5812|   						dni->new_entry->e_attrs, &dni->mods, dni->modlist,
# 5813|   						is_ctx );

Error: COMPILER_WARNING (CWE-563): [#def624]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_monitor_add’
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7129:39: warning[-Wunused-variable]: unused variable ‘bv’
# 7129 |         struct berval pndn, pdn, rdn, bv;
#      |                                       ^~
# 7127|   	BackendInfo *mi;
# 7128|   	monitor_extra_t *mbe;
# 7129|-> 	struct berval pndn, pdn, rdn, bv;
# 7130|   	char rdnbuf[sizeof("cn=Consumer 999")];
# 7131|   	Entry *e, *p;

Error: CPPCHECK_WARNING (CWE-457): [#def625]
openldap-2.6.9/openldap-2.6.9/servers/slapd/syncrepl.c:7610: warning[uninitvar]: Uninitialized variable: *sip
# 7608|   			int i;
# 7609|   
# 7610|-> 			for ( sip = &c->be->be_syncinfo, i=0; *sip; i++ ) {
# 7611|   				si = *sip;
# 7612|   				if ( c->valx == -1 || i == c->valx ) {

Error: COMPILER_WARNING (CWE-457): [#def626]
openldap-2.6.9/openldap-2.6.9/servers/slapd/txn.c: scope_hint: In function ‘txn_end_extop’
openldap-2.6.9/openldap-2.6.9/servers/slapd/txn.c:368:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  368 |         return rc;
#      |                ^~
openldap-2.6.9/openldap-2.6.9/servers/slapd/txn.c:156:13: note: ‘rc’ was declared here
#  156 |         int rc;
#      |             ^~
#  366|   	ldap_pvt_thread_mutex_unlock( &c->c_mutex );
#  367|   
#  368|-> 	return rc;
#  369|   }
#  370|   

Error: COMPILER_WARNING: [#def627]
openldap-2.6.9/openldap-2.6.9/servers/slapd/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: GCC_ANALYZER_WARNING (CWE-688): [#def628]
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:114:9: warning[-Wanalyzer-null-argument]: use of NULL ‘ss.val’ where non-null expected
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:159:1: enter_function: entry to ‘filter_stdin’
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:162:17: release_memory: ‘ss.val’ is NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:169:17: branch_true: following ‘true’ branch (when ‘eof == 0’)...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:170:37: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:170:22: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:173:28: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:176:20: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:181:20: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:181:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:188:40: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:188:40: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:188:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:198:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:198:20: branch_false: following ‘false’ branch (when ‘attrs_totlen == 0’)...
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:205:25: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/ldif-filter.c:205:25: call_function: calling ‘flush_entries’ from ‘filter_stdin’
#  112|   sort_strings( Strings *ss, size_t offset )
#  113|   {
#  114|-> 	qsort( ss->val + offset, ss->len - offset, sizeof(*ss->val), cmp );
#  115|   }
#  116|   

Error: COMPILER_WARNING (CWE-1164): [#def629]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-addel.c:40:1: warning[-Wunused-function]: ‘get_add_entry’ declared ‘static’ but never defined
#   40 | get_add_entry( char *filename );
#      | ^~~~~~~~~~~~~
#   38|   
#   39|   static LDIFRecord *
#   40|-> get_add_entry( char *filename );
#   41|   
#   42|   static void

Error: COMPILER_WARNING (CWE-1164): [#def630]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-addel.c:142:1: warning[-Wunused-function]: ‘addmodifyop’ defined but not used
#  142 | addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen )
#      | ^~~~~~~~~~~
#  140|   
#  141|   static void
#  142|-> addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen )
#  143|   {
#  144|       LDAPMod		**pmods;

Error: GCC_ANALYZER_WARNING (CWE-415): [#def631]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:423:49: warning[-Wanalyzer-double-free]: double-‘free’ of ‘creds’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:420:36: branch_true: following ‘true’ branch (when ‘pwattr’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:421:68: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-bind.c:423:49: danger: second ‘free’ here
#  421|   					struct berval	**values = ldap_get_values_len( ld, msg, pwattr );
#  422|   
#  423|-> 					creds = realloc( creds, (ndns + 1)*sizeof(struct berval) );
#  424|   					if ( !creds ) {
#  425|   						tester_error( "realloc failed" );

Error: COMPILER_WARNING (CWE-457): [#def632]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c: scope_hint: In function ‘tester_init_ld’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:478:13: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  478 |         int rc, do_retry = config->retries;
#      |             ^~
#  476|   {
#  477|   	LDAP *ld;
#  478|-> 	int rc, do_retry = config->retries;
#  479|   	int version = LDAP_VERSION3;
#  480|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def633]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:523:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:483:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:488:16: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:492:12: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:493:22: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:493:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:517:27: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:517:27: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:523:20: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-common.c:523:20: danger: use of uninitialized value ‘rc’ here
#  521|   		}
#  522|   
#  523|-> 		if ( rc != LDAP_SUCCESS ) {
#  524|   			tester_ldap_error( ld, "ldap_sasl_bind_s", NULL );
#  525|   			ldap_unbind_ext( ld, NULL, NULL );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def634]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:137:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p2’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:137:9: danger: dereference of NULL ‘p2’
#  135|   	p2 = strchr( p1, ',' );
#  136|   
#  137|-> 	*p2 = '\0';
#  138|   	rdns[1] = strdup( entry );
#  139|   	if ( rdns[1] == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def635]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:139:12: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:139:12: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  137|   	*p2 = '\0';
#  138|   	rdns[1] = strdup( entry );
#  139|-> 	if ( rdns[1] == NULL ) {
#  140|   		tester_error( "strdup failed" );
#  141|   		exit( EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def636]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:148:15: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-modrdn.c:148:15: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  146|   		DNs[1][i++] = *p2--;
#  147|   	
#  148|-> 	DNs[1][i] = '\0';
#  149|   	rdns[0] = strdup( DNs[1] );
#  150|   	if ( rdns[0] == NULL ) {

Error: COMPILER_WARNING: [#def637]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c:128:50: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size 8177
#  128 |         snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#      |                                                  ^~
#......
#  277 |                 thread_verbose(-1, outstr);
#      |                                    ~~~~~~         
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 16 and 8207 bytes into a destination of size 8192
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  126|   	if (!verbose)
#  127|   		return;
#  128|-> 	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  129|   	tester_error( thrstr );
#  130|   }

Error: COMPILER_WARNING: [#def638]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c: scope_hint: In function ‘do_read.isra.0’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c:128:50: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size between 8168 and 8178
#  128 |         snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#      |                                                  ^~
#......
#  666 |                 thread_verbose( idx, thrstr );
#      |                                      ~~~~~~       
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 15 and 8216 bytes into a destination of size 8192
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  126|   	if (!verbose)
#  127|   		return;
#  128|-> 	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  129|   	tester_error( thrstr );
#  130|   }

Error: COMPILER_WARNING (CWE-563): [#def639]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c:162:26: warning[-Wunused-variable]: unused variable ‘manager’
#  162 |         char            *manager = NULL;
#      |                          ^~~~~~~
#  160|   	int		i;
#  161|   	char		*uri = NULL;
#  162|-> 	char		*manager = NULL;
#  163|   	struct berval	passwd = { 0, NULL };
#  164|   	char		outstr[BUFSIZ];

Error: COMPILER_WARNING (CWE-563): [#def640]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c: scope_hint: In function ‘main’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c:163:25: warning[-Wunused-variable]: unused variable ‘passwd’
#  163 |         struct berval   passwd = { 0, NULL };
#      |                         ^~~~~~
#  161|   	char		*uri = NULL;
#  162|   	char		*manager = NULL;
#  163|-> 	struct berval	passwd = { 0, NULL };
#  164|   	char		outstr[BUFSIZ];
#  165|   	int		ptpass;

Error: COMPILER_WARNING: [#def641]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c: scope_hint: In function ‘main’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-mtread.c:268:61: warning[-Wformat-truncation=]: ‘%s’ directive argument is null
#  268 |         snprintf(outstr, BUFSIZ, "MT Test Start: conns: %d (%s)", noconns, uri);
#      |                                                             ^~
#  266|   	}
#  267|   
#  268|-> 	snprintf(outstr, BUFSIZ, "MT Test Start: conns: %d (%s)", noconns, uri);
#  269|   	tester_error(outstr);
#  270|   	snprintf(outstr, BUFSIZ, "Threads: RO: %d RW: %d", threads, rwthreads);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:230:36: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:234:46: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:235:74: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:235:65: acquire_memory: allocated here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-search.c:230:36: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  228|   
#  229|   				values = realloc( values, ( nvalues + n + 1 )*sizeof( char * ) );
#  230|-> 				if ( !values ) {
#  231|   					tester_error( "realloc failed" );
#  232|   					exit( EXIT_FAILURE );

Error: CPPCHECK_WARNING (CWE-476): [#def643]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:235: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: *epp
#  233|   			for ( p = b; p[0]; p++ ) {
#  234|   				*epp = calloc( 1, sizeof( extra_t ) );
#  235|-> 				(*epp)->action = p[0];
#  236|   				epp = &(*epp)->next;
#  237|   				nextra++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def644]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:235:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:218:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:220:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:230:45: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:234:40: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:235:33: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  233|   			for ( p = b; p[0]; p++ ) {
#  234|   				*epp = calloc( 1, sizeof( extra_t ) );
#  235|-> 				(*epp)->action = p[0];
#  236|   				epp = &(*epp)->next;
#  237|   				nextra++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def645]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:235:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘extra’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:218:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:220:17: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:230:45: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:234:40: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:235:33: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  233|   			for ( p = b; p[0]; p++ ) {
#  234|   				*epp = calloc( 1, sizeof( extra_t ) );
#  235|-> 				(*epp)->action = p[0];
#  236|   				epp = &(*epp)->next;
#  237|   				nextra++;

Error: COMPILER_WARNING (CWE-563): [#def646]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c: scope_hint: In function ‘get_search_filters’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:920:33: warning[-Wunused-but-set-variable]: variable ‘got_URL’ set but not used
#  920 |                         int     got_URL = 0;
#      |                                 ^~~~~~~
#  918|   		while (( filter < MAXREQS ) && ( fgets( line, BUFSIZ, fp ))) {
#  919|   			char	*nl;
#  920|-> 			int	got_URL = 0;
#  921|   
#  922|   			if (( nl = strchr( line, '\r' )) || ( nl = strchr( line, '\n' )))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def647]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:955:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*filters’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:915:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:918:24: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:922:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:923:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:950:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:951:33: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:953:43: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:954:28: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:955:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-tester.c:955:38: danger: ‘strdup(&line)’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  953|   			filters[filter] = ArgDup( line );
#  954|   			if ( attrs ) {
#  955|-> 				if ( filters[filter][0] == '+') {
#  956|   					char	*sep = strchr( filters[filter], ':' );
#  957|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def648]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:644:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘servers’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:631:19: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:14: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:640:28: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:641:28: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:641:28: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:644:40: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:644:33: danger: ‘servers + (long unsigned int)i * 312’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  642|   				servers[i].sid = atoi(sids[i]);
#  643|   			else
#  644|-> 				servers[i].sid = i+1;
#  645|   	}
#  646|   

Error: CPPCHECK_WARNING (CWE-476): [#def649]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:648: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: servers
#  646|   
#  647|   	for ( i = 0; i < numservers; i++ ) {
#  648|-> 		servers[i].url = argv[i];
#  649|   		servers[i].times = calloc( numservers, sizeof(activity));
#  650|   		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def650]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:648:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘servers’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:631:19: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:647:22: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:648:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:648:17: danger: ‘servers + (long unsigned int)i * 312’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  646|   
#  647|   	for ( i = 0; i < numservers; i++ ) {
#  648|-> 		servers[i].url = argv[i];
#  649|   		servers[i].times = calloc( numservers, sizeof(activity));
#  650|   		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));

Error: CPPCHECK_WARNING (CWE-476): [#def651]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:649: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: servers
#  647|   	for ( i = 0; i < numservers; i++ ) {
#  648|   		servers[i].url = argv[i];
#  649|-> 		servers[i].times = calloc( numservers, sizeof(activity));
#  650|   		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));
#  651|   		servers[i].csn_prev.vals = calloc( numservers, sizeof(struct berval));

Error: CPPCHECK_WARNING (CWE-476): [#def652]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:650: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: servers
#  648|   		servers[i].url = argv[i];
#  649|   		servers[i].times = calloc( numservers, sizeof(activity));
#  650|-> 		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));
#  651|   		servers[i].csn_prev.vals = calloc( numservers, sizeof(struct berval));
#  652|   		servers[i].csn_curr.tvs = calloc( numservers, sizeof(struct timeval));

Error: CPPCHECK_WARNING (CWE-476): [#def653]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:651: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: servers
#  649|   		servers[i].times = calloc( numservers, sizeof(activity));
#  650|   		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));
#  651|-> 		servers[i].csn_prev.vals = calloc( numservers, sizeof(struct berval));
#  652|   		servers[i].csn_curr.tvs = calloc( numservers, sizeof(struct timeval));
#  653|   		servers[i].csn_prev.tvs = calloc( numservers, sizeof(struct timeval));

Error: CPPCHECK_WARNING (CWE-476): [#def654]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:652: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: servers
#  650|   		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));
#  651|   		servers[i].csn_prev.vals = calloc( numservers, sizeof(struct berval));
#  652|-> 		servers[i].csn_curr.tvs = calloc( numservers, sizeof(struct timeval));
#  653|   		servers[i].csn_prev.tvs = calloc( numservers, sizeof(struct timeval));
#  654|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def655]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:653: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: servers
#  651|   		servers[i].csn_prev.vals = calloc( numservers, sizeof(struct berval));
#  652|   		servers[i].csn_curr.tvs = calloc( numservers, sizeof(struct timeval));
#  653|-> 		servers[i].csn_prev.tvs = calloc( numservers, sizeof(struct timeval));
#  654|   	}
#  655|   

Error: CPPCHECK_WARNING (CWE-682): [#def656]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:657: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  655|   
#  656|   	msg1 = malloc( numservers * 2 * sizeof(int));
#  657|-> 	msg2 = msg1 + numservers;
#  658|   
#  659|   	for (;;) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def657]
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:668:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘msg1’
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:647:22: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:648:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:647:22: branch_false: following ‘false’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:656:24: branch_false: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:656:16: acquire_memory: this call could return NULL
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:666:27: branch_true: following ‘true’ branch...
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:667:38: branch_true: ...to here
openldap-2.6.9/openldap-2.6.9/tests/progs/slapd-watcher.c:668:33: danger: ‘msg1 + (long unsigned int)i * 4’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  666|   		for (i=0; i<numservers; i++) {
#  667|   			if ( !servers[i].ld || !(servers[i].flags & WAS_LATE )) {
#  668|-> 				msg1[i] = 0;
#  669|   				msg2[i] = 0;
#  670|   			}

Error: COMPILER_WARNING: [#def658]
openldap-2.6.9/openldap-ppolicy-check-password-1.1/check_password.c: scope_hint: In function ‘chomp’
openldap-2.6.9/openldap-ppolicy-check-password-1.1/check_password.c:99:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#   99 |         strncpy (t,s,strlen(s)+1);
#      |         ^
openldap-2.6.9/openldap-ppolicy-check-password-1.1/check_password.c:99:22: note: length computed here
#   99 |         strncpy (t,s,strlen(s)+1);
#      |                      ^~~~~~~~~
#   97|   {
#   98|   	char* t = ber_memalloc(strlen(s)+1);
#   99|-> 	strncpy (t,s,strlen(s)+1);
#  100|   
#  101|   	if ( t[strlen(t)-1] == '\n' ) {

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-205.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopenldap-2.6.9-5.fc43
store-results-to/tmp/tmpzvwdbvao/openldap-2.6.9-5.fc43.tar.xz
time-created2025-04-25 14:41:24
time-finished2025-04-25 14:46:16
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpzvwdbvao/openldap-2.6.9-5.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpzvwdbvao/openldap-2.6.9-5.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9