openldap-2.6.10-4.fc44

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-401): [#def9]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:228:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1919:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: call_function: calling ‘st_value’ from ‘tool_server_controls’
#  226|   		name = namebuf;
#  227|   
#  228|-> 		h = gethostbyname( name );
#  229|   		if ( h != NULL ) {
#  230|   			AC_MEMCPY( &addr, h->h_addr, sizeof( addr ) );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:236:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1919:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: call_function: calling ‘st_value’ from ‘tool_server_controls’
#  234|   
#  235|   	if ( sessionTrackingName != NULL ) {
#  236|-> 		ber_str2bv( sessionTrackingName , 0, 0, &id );
#  237|   	} else
#  238|   #ifdef HAVE_CYRUS_SASL

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:240:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1919:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: call_function: calling ‘st_value’ from ‘tool_server_controls’
#  238|   #ifdef HAVE_CYRUS_SASL
#  239|   	if ( sasl_authz_id != NULL ) {
#  240|-> 		ber_str2bv( sasl_authz_id, 0, 0, &id );
#  241|   
#  242|   	} else if ( sasl_authc_id != NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:243:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1919:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: call_function: calling ‘st_value’ from ‘tool_server_controls’
#  241|   
#  242|   	} else if ( sasl_authc_id != NULL ) {
#  243|-> 		ber_str2bv( sasl_authc_id, 0, 0, &id );
#  244|   
#  245|   	} else 

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:248:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1919:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1920:50: call_function: calling ‘st_value’ from ‘tool_server_controls’
#  246|   #endif /* HAVE_CYRUS_SASL */
#  247|   	if ( binddn != NULL ) {
#  248|-> 		ber_str2bv( binddn, 0, 0, &id );
#  249|   	}
#  250|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:286:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
#  284|   
#  285|   #ifdef HAVE_CYRUS_SASL
#  286|-> 	sasl_done();
#  287|   #endif
#  288|   #ifdef HAVE_TLS

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:289:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
#  287|   #endif
#  288|   #ifdef HAVE_TLS
#  289|-> 	ldap_pvt_tls_destroy();
#  290|   #endif
#  291|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:293:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
#  291|   
#  292|   	if ( ldapuri != NULL ) {
#  293|-> 		ber_memfree( ldapuri );
#  294|   		ldapuri = NULL;
#  295|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:298:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
#  296|   
#  297|   	if ( pr_cookie.bv_val != NULL ) {
#  298|-> 		ber_memfree( pr_cookie.bv_val );
#  299|   		BER_BVZERO( &pr_cookie );
#  300|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:303:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
#  301|   
#  302|   	if ( passwd.bv_val != NULL ) {
#  303|-> 		ber_memfree( passwd.bv_val );
#  304|   		BER_BVZERO( &passwd );
#  305|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:309:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
#  307|   #ifdef LDAP_CONTROL_X_SESSION_TRACKING
#  308|   	if ( !BER_BVISNULL( &stValue ) ) {
#  309|-> 		ber_memfree( stValue.bv_val );
#  310|   		BER_BVZERO( &stValue );
#  311|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1650:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘err’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1476:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1497:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1556:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1558:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1564:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1565:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1570:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1570:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1576:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1576:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1586:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1586:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1616:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1616:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1630:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1630:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1646:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1646:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1650:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1650:14: danger: use of uninitialized value ‘err’ here
# 1648|   	}
# 1649|   
# 1650|-> 	if ( err != LDAP_SUCCESS
# 1651|   		|| msgbuf[0]
# 1652|   		|| ( matched && matched[ 0 ] )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1669:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
# 1667|   tool_unbind( LDAP *ld )
# 1668|   {
# 1669|-> 	int err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, NULL );
# 1670|   
# 1671|   	if ( err != LDAP_OPT_SUCCESS ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1675:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1691:1: enter_function: entry to ‘tool_server_controls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1764:25: call_function: calling ‘tool_exit’ from ‘tool_server_controls’
# 1673|   	}
# 1674|   
# 1675|-> 	(void) ldap_unbind_ext( ld, NULL, NULL );
# 1676|   }
# 1677|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1729:31: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1729:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1729:31: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1727|   	if ( assertctl ) {
# 1728|   		if ( BER_BVISNULL( &assertionvalue ) ) {
# 1729|-> 			err = ldap_create_assertion_control_value( ld,
# 1730|   				assertion, &assertionvalue );
# 1731|   			if ( err ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1759|   		BerElement *ber = (BerElement *)&berbuf;
# 1760|   		
# 1761|-> 		ber_init2( ber, NULL, LBER_USE_DER );
# 1762|   
# 1763|   		if ( ber_printf( ber, "s", proxydn ) == -1 ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:22: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 1761|   		ber_init2( ber, NULL, LBER_USE_DER );
# 1762|   
# 1763|-> 		if ( ber_printf( ber, "s", proxydn ) == -1 ) {
# 1764|   			tool_exit( ld, EXIT_FAILURE );
# 1765|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1767:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1761:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1763:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1767:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1767:22: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 1765|   		}
# 1766|   
# 1767|-> 		if ( ber_flatten2( ber, &c[i].ldctl_value, 0 ) == -1 ) {
# 1768|   			tool_exit( ld, EXIT_FAILURE );
# 1769|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1818:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1818:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1818:33: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 1816|   
# 1817|   		if( preread_attrs ) {
# 1818|-> 			attrs = ldap_str2charray( preread_attrs, "," );
# 1819|   		}
# 1820|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1821:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1821:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1821:17: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 1819|   		}
# 1820|   
# 1821|-> 		ber_init2( ber, NULL, LBER_USE_DER );
# 1822|   
# 1823|   		if( ber_printf( ber, "{v}", attrs ) == -1 ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1823:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1821:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1823:21: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 1821|   		ber_init2( ber, NULL, LBER_USE_DER );
# 1822|   
# 1823|-> 		if( ber_printf( ber, "{v}", attrs ) == -1 ) {
# 1824|   			fprintf( stderr, "preread attrs encode failed.\n" );
# 1825|   			tool_exit( ld, EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1828:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1821:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1823:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1828:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1828:23: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 1826|   		}
# 1827|   
# 1828|-> 		err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
# 1829|   		if( err < 0 ) {
# 1830|   			fprintf( stderr, "preread flatten failed (%d)\n", err );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1839:29: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1817:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1818:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1823:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1828:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1829:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1834:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1839:19: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1839:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1839:29: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
# 1837|   		i++;
# 1838|   
# 1839|-> 		if( attrs ) ldap_charray_free( attrs );
# 1840|   	}
# 1841|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1848:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1848:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1848:33: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 1846|   
# 1847|   		if( postread_attrs ) {
# 1848|-> 			attrs = ldap_str2charray( postread_attrs, "," );
# 1849|   		}
# 1850|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1851:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1851:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1851:17: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 1849|   		}
# 1850|   
# 1851|-> 		ber_init2( ber, NULL, LBER_USE_DER );
# 1852|   
# 1853|   		if( ber_printf( ber, "{v}", attrs ) == -1 ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1853:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1851:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1853:21: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 1851|   		ber_init2( ber, NULL, LBER_USE_DER );
# 1852|   
# 1853|-> 		if( ber_printf( ber, "{v}", attrs ) == -1 ) {
# 1854|   			fprintf( stderr, "postread attrs encode failed.\n" );
# 1855|   			tool_exit( ld, EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1858:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1851:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1853:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1858:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1858:23: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 1856|   		}
# 1857|   
# 1858|-> 		err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
# 1859|   		if( err < 0 ) {
# 1860|   			fprintf( stderr, "postread flatten failed (%d)\n", err );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1869:29: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1847:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1848:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1853:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1858:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1859:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1864:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1869:19: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1869:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1869:29: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
# 1867|   		i++;
# 1868|   
# 1869|-> 		if( attrs ) ldap_charray_free( attrs );
# 1870|   	}
# 1871|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
# 1876|   			BerElement *ber = (BerElement *)&berbuf;
# 1877|   
# 1878|-> 			ber_init2( ber, NULL, LBER_USE_DER );
# 1879|   
# 1880|   			err = ber_printf( ber, "{e" /* } */, chainingResolve );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1880:31: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1880:31: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
# 1878|   			ber_init2( ber, NULL, LBER_USE_DER );
# 1879|   
# 1880|-> 			err = ber_printf( ber, "{e" /* } */, chainingResolve );
# 1881|   		    	if ( err == -1 ) {
# 1882|   				ber_free( ber, 1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1882:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1881:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1882:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1882:33: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
# 1880|   			err = ber_printf( ber, "{e" /* } */, chainingResolve );
# 1881|   		    	if ( err == -1 ) {
# 1882|-> 				ber_free( ber, 1 );
# 1883|   				fprintf( stderr, _("Chaining behavior control encoding error!\n") );
# 1884|   				tool_exit( ld, EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1888:39: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1888:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1888:39: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
# 1886|   
# 1887|   			if ( chainingContinuation > -1 ) {
# 1888|-> 				err = ber_printf( ber, "e", chainingContinuation );
# 1889|   		    		if ( err == -1 ) {
# 1890|   					ber_free( ber, 1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1890:41: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1888:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1889:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1890:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1890:41: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
# 1888|   				err = ber_printf( ber, "e", chainingContinuation );
# 1889|   		    		if ( err == -1 ) {
# 1890|-> 					ber_free( ber, 1 );
# 1891|   					fprintf( stderr, _("Chaining behavior control encoding error!\n") );
# 1892|   					tool_exit( ld, EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1896:31: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1896:31: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 1894|   			}
# 1895|   
# 1896|-> 			err = ber_printf( ber, /* { */ "N}" );
# 1897|   		    	if ( err == -1 ) {
# 1898|   				ber_free( ber, 1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1898:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1897:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1898:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1898:33: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 1896|   			err = ber_printf( ber, /* { */ "N}" );
# 1897|   		    	if ( err == -1 ) {
# 1898|-> 				ber_free( ber, 1 );
# 1899|   				fprintf( stderr, _("Chaining behavior control encoding error!\n") );
# 1900|   				tool_exit( ld, EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1903:30: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1874:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1878:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1887:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1897:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1903:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1903:30: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
# 1901|   			}
# 1902|   
# 1903|-> 			if ( ber_flatten2( ber, &c[i].ldctl_value, 0 ) == -1 ) {
# 1904|   				tool_exit( ld, EXIT_FAILURE );
# 1905|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1941:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctrls’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1721:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1722:12: branch_false: following ‘false’ branch (when ‘ctrls’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1727:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1728:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1757:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1778:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1812:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1842:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1873:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1941:15: danger: ‘ctrls’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
# 1939|   	ctrls[i] = NULL;
# 1940|   
# 1941|-> 	err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
# 1942|   
# 1943|   	if ( err != LDAP_OPT_SUCCESS ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2022:39: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1993:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1997:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:1997:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2002:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2004:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2006:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2009:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2010:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2009:30: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2016:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2016:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2019:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2019:39: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2022:39: danger: ‘str’ leaks here; was allocated at [(13)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/12)
# 2020|   
# 2021|   				ptr = str;
# 2022|-> 				ptr = lutil_strncopy( ptr, bv.bv_val, bv.bv_len );
# 2023|   				ptr = lutil_strcopy( ptr, ": " );
# 2024|   			}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def47]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2167:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘len’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2129:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2134:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2161:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2167:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2167:17: danger: use of uninitialized value ‘len’ here
# 2165|   		}
# 2166|   
# 2167|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2168|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2169|   	}

Error: COMPILER_WARNING (CWE-457): [#def48]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c: scope_hint: In function ‘print_psearch’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2167:17: warning[-Wmaybe-uninitialized]: ‘len’ may be used uninitialized
# 2167 |                 tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2168 |                         ldif ? "persistentSearch: " : "persistentSearch", buf, len );
#      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2132:41: note: ‘len’ was declared here
# 2132 |                 int blen = sizeof(buf), len;
#      |                                         ^~~
# 2165|   		}
# 2166|   
# 2167|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2168|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2169|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2711:31: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2672:22: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2682:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2682:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2686:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2694:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2705:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2705:20: branch_false: following ‘false’ branch (when ‘<unknown> == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2709:37: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2709:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2710:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2711:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2711:31: danger: ‘str’ leaks here; was allocated at [(9)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/8)
# 2709|   		ptr = str = malloc( len + 1 );
# 2710|   		if ( ldif ) {
# 2711|-> 			ptr = lutil_strcopy( ptr, ": " );
# 2712|   		}
# 2713|   		ptr = lutil_strcopy( ptr, ctrls[i]->ldctl_oid );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2713:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2672:22: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2682:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2682:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2686:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2694:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2705:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2705:20: branch_false: following ‘false’ branch (when ‘<unknown> == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2709:37: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2709:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2710:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2713:43: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/common.c:2713:23: danger: ‘ptr’ leaks here; was allocated at [(9)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/8)
# 2711|   			ptr = lutil_strcopy( ptr, ": " );
# 2712|   		}
# 2713|-> 		ptr = lutil_strcopy( ptr, ctrls[i]->ldctl_oid );
# 2714|   		ptr = lutil_strcopy( ptr, ctrls[i]->ldctl_iscritical
# 2715|   			? " true" : " false" );

Error: GCC_ANALYZER_WARNING (CWE-688): [#def51]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/clients/tools/ldapcompare.c:199:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:203:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:210:12: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:214:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:215:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/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-401): [#def52]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:222:33: warning[-Wanalyzer-malloc-leak]: leak of ‘bvalue.bv_val’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:199:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:203:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:210:12: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:214:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:215:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:221:49: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:221:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:222:33: danger: ‘bvalue.bv_val’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  220|   		/* it's base64 encoded. */
#  221|   		bvalue.bv_val = malloc( strlen( &sep[1] ));
#  222|-> 		bvalue.bv_len = lutil_b64_pton( &sep[1],
#  223|   			(unsigned char *) bvalue.bv_val, strlen( &sep[1] ));
#  224|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:231:14: warning[-Wanalyzer-malloc-leak]: leak of ‘bvalue.bv_val’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:199:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:203:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:210:12: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:214:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:215:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:231:14: danger: ‘bvalue.bv_val’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  229|   	}
#  230|   
#  231|-> 	ld = tool_conn_setup( 0, 0 );
#  232|   
#  233|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bvalue.bv_val’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:199:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:203:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:210:12: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:214:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:215:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:233:9: danger: ‘bvalue.bv_val’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  231|   	ld = tool_conn_setup( 0, 0 );
#  232|   
#  233|-> 	tool_bind( ld );
#  234|   
#  235|   	if ( 0

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:252:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bvalue.bv_val’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:199:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:203:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:210:12: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:214:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:215:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:216:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapcompare.c:252:9: danger: ‘bvalue.bv_val’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  250|   	}
#  251|   
#  252|-> 	tool_server_controls( ld, c, i );
#  253|   
#  254|   	if ( verbose ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  187|   	}
#  188|   
#  189|-> 	ld = tool_conn_setup( 0, &private_conn_setup );
#  190|   
#  191|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  187|   	}
#  188|   
#  189|-> 	ld = tool_conn_setup( 0, &private_conn_setup );
#  190|   
#  191|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:191:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:191:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  189|   	ld = tool_conn_setup( 0, &private_conn_setup );
#  190|   
#  191|-> 	tool_bind( ld );
#  192|   
#  193|   	tool_server_controls( ld, NULL, 0 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:191:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:191:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  189|   	ld = tool_conn_setup( 0, &private_conn_setup );
#  190|   
#  191|-> 	tool_bind( ld );
#  192|   
#  193|   	tool_server_controls( ld, NULL, 0 );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:193:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:193:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  191|   	tool_bind( ld );
#  192|   
#  193|-> 	tool_server_controls( ld, NULL, 0 );
#  194|   
#  195|   	retval = rc = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:193:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:193:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  191|   	tool_bind( ld );
#  192|   
#  193|-> 	tool_server_controls( ld, NULL, 0 );
#  194|   
#  195|   	retval = rc = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:221:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:197:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:208:24: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:208:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:217:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:221:9: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  219|   	}
#  220|   
#  221|-> 	tool_exit( ld, retval );
#  222|   }
#  223|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:221:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:179:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:189:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:197:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:208:24: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:208:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:217:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapdelete.c:221:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  219|   	}
#  220|   
#  221|-> 	tool_exit( ld, retval );
#  222|   }
#  223|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:175:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_true: following ‘true’ branch (when ‘entrydn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:175:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:175:25: danger: ‘rdn’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  173|   		}
#  174|   		if (( entrydn = strdup( argv[argc - 2] )) == NULL ) {
#  175|-> 			perror( "strdup" );
#  176|   			retval = EXIT_FAILURE;
#  177|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:187:25: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:187:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:187:25: danger: ‘entrydn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  185|   	if ( infile != NULL ) {
#  186|   		if (( fp = fopen( infile, "r" )) == NULL ) {
#  187|-> 			perror( infile );
#  188|   			retval = EXIT_FAILURE;
#  189|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:187:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:187:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:187:25: danger: ‘rdn’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  185|   	if ( infile != NULL ) {
#  186|   		if (( fp = fopen( infile, "r" )) == NULL ) {
#  187|-> 			perror( infile );
#  188|   			retval = EXIT_FAILURE;
#  189|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  193|   	}
#  194|   
#  195|-> 	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: danger: ‘entrydn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  193|   	}
#  194|   
#  195|-> 	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  193|   	}
#  194|   
#  195|-> 	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: danger: ‘rdn’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  193|   	}
#  194|   
#  195|-> 	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|   	tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  195|   	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|-> 	tool_bind( ld );
#  198|   
#  199|   	tool_server_controls( ld, NULL, 0 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: danger: ‘entrydn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  195|   	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|-> 	tool_bind( ld );
#  198|   
#  199|   	tool_server_controls( ld, NULL, 0 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  195|   	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|-> 	tool_bind( ld );
#  198|   
#  199|   	tool_server_controls( ld, NULL, 0 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:197:9: danger: ‘rdn’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  195|   	ld = tool_conn_setup( 0, 0 );
#  196|   
#  197|-> 	tool_bind( ld );
#  198|   
#  199|   	tool_server_controls( ld, NULL, 0 );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  197|   	tool_bind( ld );
#  198|   
#  199|-> 	tool_server_controls( ld, NULL, 0 );
#  200|   
#  201|   	retval = rc = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: danger: ‘entrydn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  197|   	tool_bind( ld );
#  198|   
#  199|-> 	tool_server_controls( ld, NULL, 0 );
#  200|   
#  201|   	retval = rc = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  197|   	tool_bind( ld );
#  198|   
#  199|-> 	tool_server_controls( ld, NULL, 0 );
#  200|   
#  201|   	retval = rc = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:199:9: danger: ‘rdn’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  197|   	tool_bind( ld );
#  198|   
#  199|-> 	tool_server_controls( ld, NULL, 0 );
#  200|   
#  201|   	retval = rc = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:208:28: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:49: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:36: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:208:28: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:209:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:209:36: branch_true: following ‘true’ branch (when ‘rdn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  208|   			if ( havedn ) {	/* have DN, get RDN */
#  209|   				if (( rdn = strdup( buf )) == NULL ) {
#  210|-> 					perror( "strdup" );
#  211|   					retval = EXIT_FAILURE;
#  212|   					goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:208:28: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:49: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:49: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:36: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:208:28: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:209:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:209:36: branch_true: following ‘true’ branch (when ‘rdn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: danger: ‘entrydn’ leaks here; was allocated at [(13)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/12)
#  208|   			if ( havedn ) {	/* have DN, get RDN */
#  209|   				if (( rdn = strdup( buf )) == NULL ) {
#  210|-> 					perror( "strdup" );
#  211|   					retval = EXIT_FAILURE;
#  212|   					goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:208:28: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:49: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:221:36: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:208:28: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:209:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:209:36: branch_true: following ‘true’ branch (when ‘rdn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:210:41: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  208|   			if ( havedn ) {	/* have DN, get RDN */
#  209|   				if (( rdn = strdup( buf )) == NULL ) {
#  210|-> 					perror( "strdup" );
#  211|   					retval = EXIT_FAILURE;
#  212|   					goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:234:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:46: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:231:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:231:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:231:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:232:12: branch_false: following ‘false’ branch (when ‘entrydn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:233:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:233:12: branch_false: following ‘false’ branch (when ‘rdn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:234:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:234:9: danger: ‘fp’ leaks here; was opened at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  232|   	if ( entrydn ) free( entrydn );
#  233|   	if ( rdn ) free( rdn );
#  234|-> 	tool_exit( ld, retval );
#  235|   }
#  236|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:234:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:180:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:28: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:195:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_false: following ‘false’ branch (when ‘havedn == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:21: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:204:46: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:231:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:231:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:231:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:232:12: branch_false: following ‘false’ branch (when ‘entrydn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:233:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:233:12: branch_false: following ‘false’ branch (when ‘rdn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:234:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:234:9: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
#  232|   	if ( entrydn ) free( entrydn );
#  233|   	if ( rdn ) free( rdn );
#  234|-> 	tool_exit( ld, retval );
#  235|   }
#  236|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:260:14: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  258|   	if( dont ) return LDAP_SUCCESS;
#  259|   
#  260|-> 	rc = ldap_rename( ld, dn, rdn, newSuperior, remove,
#  261|   		NULL, NULL, &id );
#  262|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:260:14: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  258|   	if( dont ) return LDAP_SUCCESS;
#  259|   
#  260|-> 	rc = ldap_rename( ld, dn, rdn, newSuperior, remove,
#  261|   		NULL, NULL, &id );
#  262|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:264:17: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  262|   
#  263|   	if ( rc != LDAP_SUCCESS ) {
#  264|-> 		fprintf( stderr, "%s: ldap_rename: %s (%d)\n",
#  265|   			prog, ldap_err2string( rc ), rc );
#  266|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:264:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  262|   
#  263|   	if ( rc != LDAP_SUCCESS ) {
#  264|-> 		fprintf( stderr, "%s: ldap_rename: %s (%d)\n",
#  265|   			prog, ldap_err2string( rc ), rc );
#  266|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:272:22: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  270|   		struct timeval	tv = { 0, 0 };
#  271|   
#  272|-> 		if ( tool_check_abandon( ld, id ) ) {
#  273|   			return LDAP_CANCELLED;
#  274|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:272:22: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  270|   		struct timeval	tv = { 0, 0 };
#  271|   
#  272|-> 		if ( tool_check_abandon( ld, id ) ) {
#  273|   			return LDAP_CANCELLED;
#  274|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:279:22: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  277|   		tv.tv_usec = 100000;
#  278|   
#  279|-> 		rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
#  280|   		if ( rc < 0 ) {
#  281|   			tool_perror( "ldap_result", rc, NULL, NULL, NULL, NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:279:22: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  277|   		tv.tv_usec = 100000;
#  278|   
#  279|-> 		rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
#  280|   		if ( rc < 0 ) {
#  281|   			tool_perror( "ldap_result", rc, NULL, NULL, NULL, NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:281:25: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  279|   		rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
#  280|   		if ( rc < 0 ) {
#  281|-> 			tool_perror( "ldap_result", rc, NULL, NULL, NULL, NULL );
#  282|   			return rc;
#  283|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:281:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  279|   		rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
#  280|   		if ( rc < 0 ) {
#  281|-> 			tool_perror( "ldap_result", rc, NULL, NULL, NULL, NULL );
#  282|   			return rc;
#  283|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:290:14: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  288|   	}
#  289|   
#  290|-> 	rc = ldap_parse_result( ld, res, &code, &matcheddn, &text, &refs, &ctrls, 1 );
#  291|   
#  292|   	if( rc != LDAP_SUCCESS ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:290:14: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  288|   	}
#  289|   
#  290|-> 	rc = ldap_parse_result( ld, res, &code, &matcheddn, &text, &refs, &ctrls, 1 );
#  291|   
#  292|   	if( rc != LDAP_SUCCESS ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:293:17: warning[-Wanalyzer-malloc-leak]: leak of ‘entrydn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  291|   
#  292|   	if( rc != LDAP_SUCCESS ) {
#  293|-> 		fprintf( stderr, "%s: ldap_parse_result: %s (%d)\n",
#  294|   			prog, ldap_err2string( rc ), rc );
#  295|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:293:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rdn’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:155:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:168:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:29: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:169:20: branch_false: following ‘false’ branch (when ‘rdn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:174:20: branch_false: following ‘false’ branch (when ‘entrydn’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:185:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:202:12: branch_true: following ‘true’ branch (when ‘havedn != 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapmodrdn.c:203:26: call_function: calling ‘domodrdn’ from ‘main’
#  291|   
#  292|   	if( rc != LDAP_SUCCESS ) {
#  293|-> 		fprintf( stderr, "%s: ldap_parse_result: %s (%d)\n",
#  294|   			prog, ldap_err2string( rc ), rc );
#  295|   		return rc;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def98]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/clients/tools/ldappasswd.c:128:32: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:131:42: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:135:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def99]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/clients/tools/ldappasswd.c:143:32: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:146:42: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:150:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def100]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:197:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:36: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:24: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:205:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: danger: ‘user’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  272|   	if( ! want_bindearly ) {
#  273|   		/* bind */
#  274|-> 		ld = tool_conn_setup( 0, 0 );
#  275|   
#  276|   		tool_bind( ld );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:276:17: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:197:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:36: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:24: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:205:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:276:17: danger: ‘user’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  274|   		ld = tool_conn_setup( 0, 0 );
#  275|   
#  276|-> 		tool_bind( ld );
#  277|   	}
#  278|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:281:23: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:197:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:36: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:24: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:205:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:279:11: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:281:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:281:23: danger: ‘user’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  279|   	if( user != NULL || oldpw.bv_val != NULL || newpw.bv_val != NULL ) {
#  280|   		/* build the password modify request data */
#  281|-> 		ber = ber_alloc_t( LBER_USE_DER );
#  282|   
#  283|   		if( ber == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:284:25: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:197:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:36: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:24: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:205:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:279:11: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:281:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:283:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:284:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:284:25: danger: ‘user’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  282|   
#  283|   		if( ber == NULL ) {
#  284|-> 			perror( "ber_alloc_t" );
#  285|   			rc = EXIT_FAILURE;
#  286|   			goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:289:17: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:197:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:36: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:24: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:205:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:279:11: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:281:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:283:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:289:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:289:17: danger: ‘user’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  287|   		}
#  288|   
#  289|-> 		ber_printf( ber, "{" /*}*/ );
#  290|   
#  291|   		if( user != NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:292:25: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:197:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:199:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:36: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:200:24: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:205:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:212:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:220:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:242:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:250:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:272:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:274:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:279:11: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:281:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:283:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:289:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:291:19: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:292:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldappasswd.c:292:25: danger: ‘user’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  290|   
#  291|   		if( user != NULL ) {
#  292|-> 			ber_printf( ber, "ts",
#  293|   				LDAP_TAG_EXOP_MODIFY_PASSWD_ID, user );
#  294|   			free(user);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def106]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1556:25: warning[-Wanalyzer-null-argument]: use of NULL ‘fp’ where non-null expected
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1023:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1029:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1035:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1041:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1050:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1054:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1083:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1084:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1086:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1087:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1090:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1104:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1115:12: branch_true: following ‘true’ branch (when ‘fp’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1115:18: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1115:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1121:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1125:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1128:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1131:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1134:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1137:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1140:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1143:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1145:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1146:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1147:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1148:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1149:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1150:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1151:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1152:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1123:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1439:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1472:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1549:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1549:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def107]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2017:49: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfp’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1959:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1965:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1977:11: branch_false: following ‘false’ branch (when ‘ufn’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1979:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1979:12: branch_false: following ‘false’ branch (when ‘attrsonly == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1981:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1982:17: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1985:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1985:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1987:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1987:20: branch_false: following ‘false’ branch (when ‘attrsonly == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1990:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1990:27: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1991:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:1992:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2004:44: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2009:55: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2009:55: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2009:44: branch_false: following ‘false’ branch (when ‘tmpfp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2015:54: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2014:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2017:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapsearch.c:2017:49: danger: ‘tmpfp’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
# 2015|   						bvals[ i ].bv_len, 1, tmpfp ) == 0 )
# 2016|   					{
# 2017|-> 						perror( tmpfname );
# 2018|   						fclose( tmpfp );
# 2019|   						continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:89:15: warning[-Wanalyzer-malloc-leak]: leak of ‘lud.lud_exts’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:169:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:210:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:214:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:300:12: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:305:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:305:16: call_function: calling ‘do_uri_create’ from ‘main’
#   87|   	}
#   88|   
#   89|-> 	uri = ldap_url_desc2str( lud );
#   90|   
#   91|   	if ( lud->lud_attrs != NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:118:14: warning[-Wanalyzer-malloc-leak]: leak of ‘lud.lud_exts’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:169:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:210:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:214:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_true: following ‘true’ branch (when ‘opt == 72’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:187:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:187:28: branch_false: following ‘false’ branch (when ‘gotlud == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:192:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:192:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:197:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:300:12: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:301:24: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:301:24: call_function: calling ‘do_uri_explode’ from ‘main’
#  116|   	int		rc;
#  117|   
#  118|-> 	rc = ldap_url_parse( uri, &lud );
#  119|   	if ( rc != LDAP_URL_SUCCESS ) {
#  120|   		fprintf( stderr, "unable to parse URI \"%s\"\n", uri );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:149:17: warning[-Wanalyzer-malloc-leak]: leak of ‘lud.lud_exts’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:169:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:210:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:214:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_true: following ‘true’ branch (when ‘opt == 72’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:187:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:187:28: branch_false: following ‘false’ branch (when ‘gotlud == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:192:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:192:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:197:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:300:12: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:301:24: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:301:24: call_function: calling ‘do_uri_explode’ from ‘main’
#  147|   
#  148|   	if ( lud->lud_scope != LDAP_SCOPE_DEFAULT ) {
#  149|-> 		printf( "scope: %s\n", ldap_pvt_scope2str( lud->lud_scope ) );
#  150|   	}
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:163:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lud.lud_exts’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:169:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:210:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:214:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_true: following ‘true’ branch (when ‘opt == 72’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:187:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:187:28: branch_false: following ‘false’ branch (when ‘gotlud == 0’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:192:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:192:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:197:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:300:12: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:301:24: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:301:24: call_function: calling ‘do_uri_explode’ from ‘main’
#  161|   		}
#  162|   	}
#  163|-> 	ldap_free_urldesc( lud );
#  164|   
#  165|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:290:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:182:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:186:20: branch_false: following ‘false’ branch (when ‘opt != 72’)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:201:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:210:28: branch_false: following ‘false’ branch (when ‘uri’ is NULL)...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:214:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:288:58: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapurl.c:290:37: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/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): [#def113]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:316:31: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cred.bv_val’ where non-null expected
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:314:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:315:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:315:31: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:316: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
#  314|   	if (argc - optind > 0) {
#  315|   		cred.bv_val = strdup(argv[optind++]);
#  316|-> 		cred.bv_len = strlen(cred.bv_val);
#  317|   	}
#  318|   	if (argc - optind > 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def114]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:333:31: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cred.bv_val’ where non-null expected
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:314:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:318:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:318:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:321:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:321:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:325:16: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:321:13: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:327:32: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:328:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:332:31: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:332:31: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:333: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
#  331|   		}
#  332|   		cred.bv_val = strdup(userpw);
#  333|-> 		cred.bv_len = strlen(cred.bv_val);
#  334|   	}
#  335|   

Error: CPPCHECK_WARNING (CWE-476): [#def115]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:355: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  353|       if (req_authzid) {
#  354|   		vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  355|-> 		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  356|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  357|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def116]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:356: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  354|   		vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  355|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  356|-> 		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  357|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  358|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def117]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:357: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  355|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  356|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  357|-> 		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  358|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  359|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def118]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:358: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  356|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_AUTHZID_REQUEST);
#  357|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  358|-> 		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  359|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  360|   		vcctrls[++nvcctrls] = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def119]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:359: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  357|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  358|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  359|-> 		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  360|   		vcctrls[++nvcctrls] = NULL;
#  361|       }

Error: CPPCHECK_WARNING (CWE-476): [#def120]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:360: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  358|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  359|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  360|-> 		vcctrls[++nvcctrls] = NULL;
#  361|       }
#  362|   

Error: CPPCHECK_WARNING (CWE-476): [#def121]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:365: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  363|       if (req_pp) {
#  364|   		if (!vcctrls) vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  365|-> 		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  366|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  367|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def122]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:366: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  364|   		if (!vcctrls) vcctrls = (LDAPControl **) malloc(3*sizeof(LDAPControl *));
#  365|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  366|-> 		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  367|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  368|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def123]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:367: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  365|   		vcctrls[nvcctrls] = (LDAPControl *) malloc(sizeof(LDAPControl));
#  366|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  367|-> 		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  368|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  369|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def124]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:368: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  366|   		vcctrls[nvcctrls]->ldctl_oid = ldap_strdup(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
#  367|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  368|-> 		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  369|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  370|   		vcctrls[++nvcctrls] = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def125]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:369: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  367|   		vcctrls[nvcctrls]->ldctl_iscritical = 0;
#  368|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  369|-> 		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  370|   		vcctrls[++nvcctrls] = NULL;
#  371|       }

Error: CPPCHECK_WARNING (CWE-476): [#def126]
openldap-2.6.10/openldap-2.6.10/clients/tools/ldapvc.c:370: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vcctrls
#  368|   		vcctrls[nvcctrls]->ldctl_value.bv_val = NULL;
#  369|   		vcctrls[nvcctrls]->ldctl_value.bv_len = 0;
#  370|-> 		vcctrls[++nvcctrls] = NULL;
#  371|       }
#  372|   

Error: COMPILER_WARNING: [#def127]
openldap-2.6.10/openldap-2.6.10/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: [#def128]
openldap-2.6.10/openldap-2.6.10/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: [#def129]
openldap-2.6.10/openldap-2.6.10/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: [#def130]
openldap-2.6.10/openldap-2.6.10/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: [#def131]
openldap-2.6.10/openldap-2.6.10/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: [#def132]
openldap-2.6.10/openldap-2.6.10/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: [#def133]
openldap-2.6.10/openldap-2.6.10/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: [#def134]
openldap-2.6.10/openldap-2.6.10/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: [#def135]
openldap-2.6.10/openldap-2.6.10/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: [#def136]
openldap-2.6.10/openldap-2.6.10/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): [#def137]
openldap-2.6.10/openldap-2.6.10/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: scope_hint: In function ‘nthash’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def138]
openldap-2.6.10/openldap-2.6.10/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): [#def139]
openldap-2.6.10/openldap-2.6.10/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): [#def140]
openldap-2.6.10/openldap-2.6.10/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: scope_hint: At top level
openldap-2.6.10/openldap-2.6.10/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): [#def141]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:40: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/include/ac/signal.h:25:16: warning[-Wmaybe-uninitialized]: ‘sig’ may be used uninitialized
#   25 | #define SIGNAL lutil_sigaction
openldap-2.6.10/openldap-2.6.10/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): [#def142]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:42: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c: scope_hint: In function ‘lutil_getpass’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-404): [#def143]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:107:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:104:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:106:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:107:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:107:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  105|   
#  106|   	if ( ber_int_log_proc != NULL ) {
#  107|-> 		ber_int_log_proc( ber_pvt_err_file, subsystem, level, fmt, vl );
#  108|   
#  109|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def144]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:111:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:104:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:106:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:111:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/bprint.c:111:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  109|   	} else {
#  110|   		int level;
#  111|-> 		ber_get_option( NULL, LBER_OPT_BER_DEBUG, &level );
#  112|   		buf[sizeof(buf) - 1] = '\0';
#  113|   		vsnprintf( buf, sizeof(buf)-1, fmt, vl );

Error: COMPILER_WARNING (CWE-457): [#def145]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c: scope_hint: In function ‘ber_get_stringbvl’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:467:35: warning[-Wmaybe-uninitialized]: ‘res.bo’ may be used uninitialized
#  467 |                         res.bv[n] = bvp;
#      |                         ~~~~~~~~~~^~~~~
openldap-2.6.10/openldap-2.6.10/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-404): [#def146]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:519:39: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:724:1: enter_function: entry to ‘ber_scanf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:752:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:768:30: call_function: calling ‘ber_get_stringa’ from ‘ber_scanf’
#  517|   	data = bv->bv_val;
#  518|   	if ( option & LBER_BV_ALLOC ) {
#  519|-> 		bv->bv_val = (char *) ber_memalloc_x( bv->bv_len + 1,
#  520|   			ber->ber_memctx );
#  521|   		if ( bv->bv_val == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def147]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:557:39: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:724:1: enter_function: entry to ‘ber_scanf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:752:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:774:30: call_function: calling ‘ber_get_stringa_null’ from ‘ber_scanf’
#  555|   	data = bv->bv_val;
#  556|   	if ( option & LBER_BV_ALLOC ) {
#  557|-> 		bv->bv_val = (char *) ber_memalloc_x( bv->bv_len + 1,
#  558|   			ber->ber_memctx );
#  559|   		if ( bv->bv_val == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def148]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:608:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:724:1: enter_function: entry to ‘ber_scanf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:752:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:832:30: call_function: calling ‘ber_get_stringal’ from ‘ber_scanf’
#  606|   	assert( bv != NULL );
#  607|   
#  608|-> 	*bv = (struct berval *) ber_memalloc_x( sizeof(struct berval),
#  609|   		ber->ber_memctx );
#  610|   	if ( *bv == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def149]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:651:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:724:1: enter_function: entry to ‘ber_scanf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:752:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:785:30: call_function: calling ‘ber_get_bitstringa’ from ‘ber_scanf’
#  649|   	}
#  650|   
#  651|-> 	*buf = (char *) ber_memalloc_x( data.bv_len, ber->ber_memctx );
#  652|   	if ( *buf == NULL ) {
#  653|   		return LBER_DEFAULT;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def150]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:747:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:747:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:747:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  745|   
#  746|   	if ( ber->ber_debug & (LDAP_DEBUG_TRACE|LDAP_DEBUG_BER)) {
#  747|-> 		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
#  748|   			"ber_scanf fmt (%s) ber:\n", fmt );
#  749|   		ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );

Error: GCC_ANALYZER_WARNING (CWE-404): [#def151]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:749:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:747:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:749:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  747|   		ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
#  748|   			"ber_scanf fmt (%s) ber:\n", fmt );
#  749|-> 		ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
#  750|   	}
#  751|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def152]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:763:38: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:738:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:740:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:741:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:742:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:746:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:752:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/decode.c:763:38: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  761|   				p = va_arg( ap, void * );
#  762|   
#  763|-> 				rc = (*f)( ber, p, 0 );
#  764|   			} break;
#  765|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def153]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:193:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:541:30: call_function: calling ‘ber_put_int’ from ‘ber_printf’
#  191|   	ptr = ber_prepend_tag( ptr, tag );
#  192|   
#  193|-> 	return ber_write( ber, (char *) ptr, &data[sizeof(data)] - ptr, 0 );
#  194|   }
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def154]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:243:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:564:30: call_function: calling ‘ber_put_ostring’ from ‘ber_printf’
#  241|   	ptr = ber_prepend_tag( ptr, tag );
#  242|   
#  243|-> 	rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
#  244|   	if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
#  245|   		/* length(tag + length + contents) */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def155]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:244:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:564:30: call_function: calling ‘ber_put_ostring’ from ‘ber_printf’
#  242|   
#  243|   	rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
#  244|-> 	if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
#  245|   		/* length(tag + length + contents) */
#  246|   		return rc + (int) len;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def156]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:301:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:582:30: call_function: calling ‘ber_put_bitstring’ from ‘ber_printf’
#  299|   	ptr = ber_prepend_tag( ptr, tag );
#  300|   
#  301|-> 	rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
#  302|   	if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
#  303|   		/* length(tag + length + unused bit count + bitstring) */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def157]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:302:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:582:30: call_function: calling ‘ber_put_bitstring’ from ‘ber_printf’
#  300|   
#  301|   	rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
#  302|-> 	if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
#  303|   		/* length(tag + length + unused bit count + bitstring) */
#  304|   		return rc + (int) len;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def158]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:322:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:550:30: call_function: calling ‘ber_put_null’ from ‘ber_printf’
#  320|   	ptr = ber_prepend_tag( &data[sizeof(data) - 1], tag );
#  321|   
#  322|-> 	return ber_write( ber, (char *) ptr, &data[sizeof(data)] - ptr, 0 );
#  323|   }
#  324|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def159]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:340:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:536:30: call_function: calling ‘ber_put_boolean’ from ‘ber_printf’
#  338|   	ptr = ber_prepend_tag( &data[sizeof(data) - 2], tag );
#  339|   
#  340|-> 	return ber_write( ber, (char *) ptr, &data[sizeof(data)] - ptr, 0 );
#  341|   }
#  342|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def160]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:397:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:502:1: enter_function: entry to ‘ber_printf’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:620:30: call_function: calling ‘ber_start_seq’ from ‘ber_printf’
#  395|   	/* As ber_write(,headptr,headlen,) except update ber_sos_ptr, not *p */
#  396|   	if ( headlen > (ber_len_t) (ber->ber_end - *p) ) {
#  397|-> 		if ( ber_realloc( ber, headlen ) != 0 )
#  398|   			return -1;
#  399|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def161]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:527:38: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:527:38: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  525|   				f = va_arg( ap, BEREncodeCallback * );
#  526|   				p = va_arg( ap, void * );
#  527|-> 				rc = (*f)( ber, p );
#  528|   
#  529|   				if ( ber->ber_usertag ) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def162]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:637:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:511:9: branch_true: following ‘true’ branch (when ‘ber’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:512:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:513:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:515:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:517:23: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:636:27: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:637:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/encode.c:637:33: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  635|   		default:
#  636|   			if( ber->ber_debug ) {
#  637|-> 				ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
#  638|   					"ber_printf: unknown fmt %c\n", *fmt );
#  639|   			}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def163]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:143:30: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:64:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:77:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:93:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:100:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:105:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:105:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:110:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:111:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:116:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:116:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:120:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:142:31: call_function: calling ‘getbuf’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/liblber/etest.c:142:31: return_function: returning to ‘main’ from ‘getbuf’
openldap-2.6.10/openldap-2.6.10/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: COMPILER_WARNING (CWE-563): [#def164]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/options.c: scope_hint: In function ‘ber_get_option’
openldap-2.6.10/openldap-2.6.10/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): [#def165]
openldap-2.6.10/openldap-2.6.10/libraries/liblber/options.c: scope_hint: In function ‘ber_set_option’
openldap-2.6.10/openldap-2.6.10/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: [#def166]
openldap-2.6.10/openldap-2.6.10/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: [#def167]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def168]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/account_usability.c: scope_hint: In function ‘ldap_parse_accountusability_control’
openldap-2.6.10/openldap-2.6.10/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: [#def169]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/charray.c: scope_hint: In function ‘ldap_charray2str’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def170]
openldap-2.6.10/openldap-2.6.10/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): [#def171]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/dnssrv.c: scope_hint: In function ‘ldap_domain2hostlist’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def172]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:86:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(ber_strdup(urlstr), "rb")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:46:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:48:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:72:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:82:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:84:23: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:86:17: danger: ‘fopen(ber_strdup(urlstr), "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   84|   		url = fopen( p, "rb" );
#   85|   
#   86|-> 		ber_memfree( p );
#   87|   	} else {
#   88|   #ifdef HAVE_FETCH

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:86:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(ber_strdup(urlstr), "rb")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:46:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:48:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:72:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:82:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:84:23: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:86:17: danger: ‘fopen(ber_strdup(urlstr), "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   84|   		url = fopen( p, "rb" );
#   85|   
#   86|-> 		ber_memfree( p );
#   87|   	} else {
#   88|   #ifdef HAVE_FETCH

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘ldif_open_url(urlstr)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:98:1: enter_function: entry to ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: call_function: calling ‘ldif_open_url’ from ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: return_function: returning to ‘ldif_fetch_url’ from ‘ldif_open_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:114:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:120:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:30: danger: ‘ldif_open_url(urlstr)’ leaks here; was opened at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  119|   
#  120|   	while( (bytes = fread( buffer, 1, sizeof(buffer), url )) != 0 ) {
#  121|-> 		char *newp = ber_memrealloc( p, total + bytes + 1 );
#  122|   		if( newp == NULL ) {
#  123|   			ber_memfree( p );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:30: warning[-Wanalyzer-malloc-leak]: leak of ‘ldif_open_url(urlstr)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:98:1: enter_function: entry to ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: call_function: calling ‘ldif_open_url’ from ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: return_function: returning to ‘ldif_fetch_url’ from ‘ldif_open_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:114:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:120:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:30: danger: ‘ldif_open_url(urlstr)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  119|   
#  120|   	while( (bytes = fread( buffer, 1, sizeof(buffer), url )) != 0 ) {
#  121|-> 		char *newp = ber_memrealloc( p, total + bytes + 1 );
#  122|   		if( newp == NULL ) {
#  123|   			ber_memfree( p );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:123:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘ldif_open_url(urlstr)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:98:1: enter_function: entry to ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: call_function: calling ‘ldif_open_url’ from ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: return_function: returning to ‘ldif_fetch_url’ from ‘ldif_open_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:114:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:120:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:123:25: danger: ‘ldif_open_url(urlstr)’ leaks here; was opened at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  121|   		char *newp = ber_memrealloc( p, total + bytes + 1 );
#  122|   		if( newp == NULL ) {
#  123|-> 			ber_memfree( p );
#  124|   			fclose( url );
#  125|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:123:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ldif_open_url(urlstr)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:98:1: enter_function: entry to ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: call_function: calling ‘ldif_open_url’ from ‘ldif_fetch_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:112:15: return_function: returning to ‘ldif_fetch_url’ from ‘ldif_open_url’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:114:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:120:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:121:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/fetch.c:123:25: danger: ‘ldif_open_url(urlstr)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7)
#  121|   		char *newp = ber_memrealloc( p, total + bytes + 1 );
#  122|   		if( newp == NULL ) {
#  123|-> 			ber_memfree( p );
#  124|   			fclose( url );
#  125|   			return -1;

Error: CPPCHECK_WARNING (CWE-476): [#def178]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def179]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:95:11: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:47:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: call_function: calling ‘filter2ber’ from ‘main’
#   93|   
#   94|   	ber = ber_alloc_t( LBER_USE_DER );
#   95|-> 	if( ber == NULL ) {
#   96|   		perror( "ber_alloc_t" );
#   97|   		return EXIT_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:96:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:47:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: call_function: calling ‘filter2ber’ from ‘main’
#   94|   	ber = ber_alloc_t( LBER_USE_DER );
#   95|   	if( ber == NULL ) {
#   96|-> 		perror( "ber_alloc_t" );
#   97|   		return EXIT_FAILURE;
#   98|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:101:11: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:47:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: call_function: calling ‘filter2ber’ from ‘main’
#   99|   
#  100|   	rc = ldap_pvt_put_filter( ber, filter );
#  101|-> 	if( rc < 0 ) {
#  102|   		fprintf( stderr, "Filter error!\n");
#  103|   		return EXIT_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:107:11: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:47:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: call_function: calling ‘filter2ber’ from ‘main’
#  105|   
#  106|   	rc = ber_flatten2( ber, &bv, 0 );
#  107|-> 	if( rc < 0 ) {
#  108|   		perror( "ber_flatten2" );
#  109|   		return EXIT_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:108:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:47:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: call_function: calling ‘filter2ber’ from ‘main’
#  106|   	rc = ber_flatten2( ber, &bv, 0 );
#  107|   	if( rc < 0 ) {
#  108|-> 		perror( "ber_flatten2" );
#  109|   		return EXIT_FAILURE;
#  110|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:112:53: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:47:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:79:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ftest.c:83:16: call_function: calling ‘filter2ber’ from ‘main’
#  110|   	}
#  111|   
#  112|-> 	printf( "BER encoding (len=%ld):\n", (long) bv.bv_len );
#  113|   	ber_bprint( bv.bv_val, bv.bv_len );
#  114|   

Error: COMPILER_WARNING (CWE-665): [#def185]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def186]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:210:51: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  208|   		case ATTR_STRING:
#  209|   			p = &((char *) gopts)[attrs[i].offset];
#  210|-> 			if (* (char**) p != NULL) LDAP_FREE(* (char**) p);
#  211|   			* (char**) p = LDAP_STRDUP(opt);
#  212|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:210:51: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  208|   		case ATTR_STRING:
#  209|   			p = &((char *) gopts)[attrs[i].offset];
#  210|-> 			if (* (char**) p != NULL) LDAP_FREE(* (char**) p);
#  211|   			* (char**) p = LDAP_STRDUP(opt);
#  212|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def188]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:211:40: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  209|   			p = &((char *) gopts)[attrs[i].offset];
#  210|   			if (* (char**) p != NULL) LDAP_FREE(* (char**) p);
#  211|-> 			* (char**) p = LDAP_STRDUP(opt);
#  212|   			break;
#  213|   		case ATTR_OPTION:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:211:40: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  209|   			p = &((char *) gopts)[attrs[i].offset];
#  210|   			if (* (char**) p != NULL) LDAP_FREE(* (char**) p);
#  211|-> 			* (char**) p = LDAP_STRDUP(opt);
#  212|   			break;
#  213|   		case ATTR_OPTION:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def190]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:214:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  212|   			break;
#  213|   		case ATTR_OPTION:
#  214|-> 			ldap_set_option( NULL, attrs[i].offset, opt );
#  215|   			break;
#  216|   		case ATTR_SASL:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:214:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  212|   			break;
#  213|   		case ATTR_OPTION:
#  214|-> 			ldap_set_option( NULL, attrs[i].offset, opt );
#  215|   			break;
#  216|   		case ATTR_SASL:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def192]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:218:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  216|   		case ATTR_SASL:
#  217|   #ifdef HAVE_CYRUS_SASL
#  218|-> 			ldap_int_sasl_config( gopts, attrs[i].offset, opt );
#  219|   #endif
#  220|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:218:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  216|   		case ATTR_SASL:
#  217|   #ifdef HAVE_CYRUS_SASL
#  218|-> 			ldap_int_sasl_config( gopts, attrs[i].offset, opt );
#  219|   #endif
#  220|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:223:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  221|   		case ATTR_TLS:
#  222|   #ifdef HAVE_TLS
#  223|-> 			ldap_pvt_tls_config( NULL, attrs[i].offset, opt );
#  224|   #endif
#  225|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:223:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  221|   		case ATTR_TLS:
#  222|   #ifdef HAVE_TLS
#  223|-> 			ldap_pvt_tls_config( NULL, attrs[i].offset, opt );
#  224|   #endif
#  225|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def196]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:232:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  230|   			tv.tv_sec = strtol( opt, &next, 10 );
#  231|   			if ( next != opt && next[ 0 ] == '\0' && tv.tv_sec > 0 ) {
#  232|-> 				(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&tv );
#  233|   			}
#  234|   			} break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:232:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  230|   			tv.tv_sec = strtol( opt, &next, 10 );
#  231|   			if ( next != opt && next[ 0 ] == '\0' && tv.tv_sec > 0 ) {
#  232|-> 				(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&tv );
#  233|   			}
#  234|   			} break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def198]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:241:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  239|   			if ( next != opt && next[ 0 ] == '\0' && l > 0 && (long)((int)l) == l ) {
#  240|   				int v = (int)l;
#  241|-> 				(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&v );
#  242|   			}
#  243|   			} break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:241:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:281:13: enter_function: entry to ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:310:15: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:312:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:346:17: call_function: calling ‘ldap_int_conf_option’ from ‘openldap_ldap_init_w_conf’
#  239|   			if ( next != opt && next[ 0 ] == '\0' && l > 0 && (long)((int)l) == l ) {
#  240|   				int v = (int)l;
#  241|-> 				(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&v );
#  242|   			}
#  243|   			} break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def200]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:250:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:357:13: enter_function: entry to ‘openldap_ldap_init_w_userconf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:377:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:389:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:389:11: branch_false: following ‘false’ branch (when ‘path’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:394:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:394:9: call_function: calling ‘openldap_ldap_init_w_conf’ from ‘openldap_ldap_init_w_userconf’
#  248|   
#  249|   	if ( attrs[i].type == ATTR_NONE ) {
#  250|-> 		Debug1( LDAP_DEBUG_TRACE, "ldap_pvt_tls_config: "
#  251|   				"unknown option '%s'",
#  252|   				cmd );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:250:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:357:13: enter_function: entry to ‘openldap_ldap_init_w_userconf’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:377:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:389:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:389:11: branch_false: following ‘false’ branch (when ‘path’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:394:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:394:9: call_function: calling ‘openldap_ldap_init_w_conf’ from ‘openldap_ldap_init_w_userconf’
#  248|   
#  249|   	if ( attrs[i].type == ATTR_NONE ) {
#  250|-> 		Debug1( LDAP_DEBUG_TRACE, "ldap_pvt_tls_config: "
#  251|   				"unknown option '%s'",
#  252|   				cmd );

Error: COMPILER_WARNING (CWE-563): [#def202]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c: scope_hint: In function ‘ldap_pvt_conf_option’
openldap-2.6.10/openldap-2.6.10/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): [#def203]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c: scope_hint: In function ‘openldap_ldap_init_w_conf’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def204]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: danger: ‘fopen(file, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  306|   	}
#  307|   
#  308|-> 	Debug1(LDAP_DEBUG_TRACE, "ldap_init: using %s\n", file );
#  309|   
#  310|   	while((start = fgets(linebuf, sizeof(linebuf), fp)) != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:295:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:300:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:302:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:303:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/init.c:308:9: danger: ‘fopen(file, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  306|   	}
#  307|   
#  308|-> 	Debug1(LDAP_DEBUG_TRACE, "ldap_init: using %s\n", file );
#  309|   
#  310|   	while((start = fgets(linebuf, sizeof(linebuf), fp)) != NULL) {

Error: COMPILER_WARNING (CWE-563): [#def206]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c: scope_hint: In function ‘ldif_parse_line2’
openldap-2.6.10/openldap-2.6.10/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-775): [#def207]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:730:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file,  mode)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:726:20: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:729:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:730:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:730:23: danger: ‘fopen(file,  mode)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  728|   
#  729|   	if ( fp ) {
#  730|-> 		lfp = ber_memalloc( sizeof( LDIFFP ));
#  731|   		if ( lfp == NULL ) {
#  732|   			fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:730:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file,  mode)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:726:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:729:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:730:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:730:23: danger: ‘fopen(file,  mode)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  728|   
#  729|   	if ( fp ) {
#  730|-> 		lfp = ber_memalloc( sizeof( LDIFFP ));
#  731|   		if ( lfp == NULL ) {
#  732|   			fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:753:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:749:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:752:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:753:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldif.c:753:23: danger: ‘fp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  751|   
#  752|   	if ( fp ) {
#  753|-> 		lfp = ber_memalloc( sizeof( LDIFFP ));
#  754|   		lfp->fp = fp;
#  755|   		lfp->prev = NULL;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def210]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:215:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idn’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:119:9: branch_true: following ‘true’ branch (when ‘lr’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:120:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:120:9: branch_true: following ‘true’ branch (when ‘rbuf’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:121:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:137:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:140:36: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:144:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:147:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:151:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:195:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:200:24: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:202:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:207:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:212:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:215:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:215:17: danger: use of uninitialized value ‘idn’ here
#  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): [#def211]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c: scope_hint: In function ‘ldap_parse_ldif_record_x’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:215:19: warning[-Wmaybe-uninitialized]: ‘idn’ may be used uninitialized
#  215 |                 i = idn+1;
#      |                 ~~^~~~~~~
openldap-2.6.10/openldap-2.6.10/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): [#def212]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:424:31: warning[-Wanalyzer-null-argument]: use of NULL ‘<unknown>’ where non-null expected
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:604:1: enter_function: entry to ‘ldap_parse_ldif_record’
openldap-2.6.10/openldap-2.6.10/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): [#def213]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:556:61: warning[-Wanalyzer-null-argument]: use of NULL ‘<unknown>’ where non-null expected
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:604:1: enter_function: entry to ‘ldap_parse_ldif_record’
openldap-2.6.10/openldap-2.6.10/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): [#def214]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:725:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ppctrls’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:634:12: branch_false: following ‘false’ branch (when ‘ppctrls’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:636:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:637:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:642:12: branch_false: following ‘false’ branch (when ‘s != s’)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:645:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:653:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:696:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:700:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:710:12: branch_false: following ‘false’ branch (when ‘pctrls’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:717:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:718:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/ldifutil.c:722:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def215]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/msctrl.c: scope_hint: In function ‘ldap_parse_dirsync_control’
openldap-2.6.10/openldap-2.6.10/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-775): [#def216]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:102:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:101:26: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:102:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:102:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:102:9: danger: ‘s’ leaks here
#  100|   {
#  101|   	ber_socket_t s = socket(family, type, 0);
#  102|-> 	Debug1(LDAP_DEBUG_TRACE, "ldap_new_socket: %d\n",s );
#  103|   #ifdef FD_CLOEXEC
#  104|   	fcntl(s, F_SETFD, FD_CLOEXEC);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def217]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:104:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:101:26: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:102:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:104:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:104:9: danger: ‘s’ leaks here
#  102|   	Debug1(LDAP_DEBUG_TRACE, "ldap_new_socket: %d\n",s );
#  103|   #ifdef FD_CLOEXEC
#  104|-> 	fcntl(s, F_SETFD, FD_CLOEXEC);
#  105|   #endif
#  106|   	return ( s );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def218]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:112:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:724:35: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:727:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:736:46: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:736:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:737:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:756:17: call_function: calling ‘ldap_pvt_close_socket’ from ‘ldap_connect_to_host’
#  110|   ldap_pvt_close_socket(LDAP *ld, int s)
#  111|   {
#  112|-> 	Debug1(LDAP_DEBUG_TRACE, "ldap_close_socket: %d\n",s );
#  113|   	return tcp_close(s);
#  114|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def219]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:449:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:746:30: call_function: calling ‘ldap_pvt_connect’ from ‘ldap_connect_to_host’
#  447|   
#  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" );

Error: GCC_ANALYZER_WARNING (CWE-666): [#def220]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:450:22: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘s’ in wrong phase
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:724:35: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:727:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:736:44: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def221]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:458:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:746:30: call_function: calling ‘ldap_pvt_connect’ from ‘ldap_connect_to_host’
#  456|   		}
#  457|   		err = sock_errno();
#  458|-> 		Debug1(LDAP_DEBUG_TRACE, "connect errno: %d\n", err );
#  459|   
#  460|   	} while(err == EINTR &&

Error: GCC_ANALYZER_WARNING (CWE-775): [#def222]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:708:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:695:35: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:698:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:707:46: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:707:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:708:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:708:49: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:708:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:708:49: danger: ‘s’ leaks here
#  706|   						bind_addr );
#  707|   					if ( bind( s, ( struct sockaddr* ) &ip6addr, sizeof ip6addr ) != 0 ) {
#  708|-> 						Debug1( LDAP_DEBUG_TRACE,
#  709|   								"ldap_connect_to_host: Failed to bind source address %s\n",
#  710|   								bind_addr );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def223]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:737:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:584:1: enter_function: entry to ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:654:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:662:23: branch_true: following ‘true’ branch (when ‘sai’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:664:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: call_function: calling ‘ldap_int_socket’ from ‘ldap_connect_to_host’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:675:21: return_function: returning to ‘ldap_connect_to_host’ from ‘ldap_int_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:676:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:680:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:724:35: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:727:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:736:46: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:736:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:737:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:737:49: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:737:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-ip.c:737:49: danger: ‘s’ leaks here
#  735|   						bind_addr );
#  736|   					if ( bind(s, ( struct sockaddr* )&ip4addr, sizeof ip4addr ) != 0 ) {
#  737|-> 						Debug1( LDAP_DEBUG_TRACE,
#  738|   								"ldap_connect_to_host: Failed to bind source address %s\n",
#  739|   								bind_addr );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def224]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:81:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:80:26: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:81:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:81:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:81:9: danger: ‘s’ leaks here
#   79|   {
#   80|   	ber_socket_t s = socket(PF_LOCAL, SOCK_STREAM, 0);
#   81|-> 	Debug1(LDAP_DEBUG_TRACE, "ldap_new_socket: %d\n",s );
#   82|   #ifdef FD_CLOEXEC
#   83|   	fcntl(s, F_SETFD, FD_CLOEXEC);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def225]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:83:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:80:26: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:81:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:83:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:83:9: danger: ‘s’ leaks here
#   81|   	Debug1(LDAP_DEBUG_TRACE, "ldap_new_socket: %d\n",s );
#   82|   #ifdef FD_CLOEXEC
#   83|-> 	fcntl(s, F_SETFD, FD_CLOEXEC);
#   84|   #endif
#   85|   	return ( s );

Error: COMPILER_WARNING (CWE-252): [#def226]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c: scope_hint: In function ‘ldap_pvt_is_socket_ready’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def227]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:255:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:310:1: enter_function: entry to ‘ldap_connect_to_path’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:328:13: call_function: calling ‘ldap_pvt_socket’ from ‘ldap_connect_to_path’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:328:13: return_function: returning to ‘ldap_connect_to_path’ from ‘ldap_pvt_socket’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:329:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:333:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/os-local.c:339:14: call_function: calling ‘ldap_pvt_connect’ from ‘ldap_connect_to_path’
#  253|   		do {
#  254|   			fd.revents = 0;
#  255|-> 			rc = poll( &fd, 1, timeout );
#  256|   		} while( rc == AC_SOCKET_ERROR && errno == EINTR &&
#  257|   			LDAP_BOOL_GET(&ld->ld_options, LDAP_BOOL_RESTART ));

Error: COMPILER_WARNING (CWE-563): [#def228]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/psearchctrl.c: scope_hint: In function ‘ldap_create_persistentsearch_control_value’
openldap-2.6.10/openldap-2.6.10/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): [#def229]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/psearchctrl.c: scope_hint: In function ‘ldap_parse_entrychange_control’
openldap-2.6.10/openldap-2.6.10/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): [#def230]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/request.c: scope_hint: In function ‘ldap_send_server_request’
openldap-2.6.10/openldap-2.6.10/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): [#def231]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:717:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘lr’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:521:9: branch_true: following ‘true’ branch (when ‘ld’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:522:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:522:9: branch_true: following ‘true’ branch (when ‘lc’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:528:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:541:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:544:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:592:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:601:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:606:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:669:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:675:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:679:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:717:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:717:14: danger: use of uninitialized value ‘lr’ here
#  715|   	}
#  716|   
#  717|-> 	id = lr->lr_origid;
#  718|   	refer_cnt = 0;
#  719|   	hadref = simple_request = 0;

Error: COMPILER_WARNING (CWE-457): [#def232]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:717:16: warning[-Wmaybe-uninitialized]: ‘lr’ may be used uninitialized
#  717 |         id = lr->lr_origid;
#      |              ~~^~~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c: scope_hint: In function ‘wait4msg’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/result.c:511:26: note: ‘lr’ was declared here
#  511 |         LDAPRequest     *lr, *tmplr, dummy_lr = { 0 };
#      |                          ^~
#  715|   	}
#  716|   
#  717|-> 	id = lr->lr_origid;
#  718|   	refer_cnt = 0;
#  719|   	hadref = simple_request = 0;

Error: COMPILER_WARNING: [#def233]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/schema.c: scope_hint: In function ‘append_to_safe_string.isra.0’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def234]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/schema.c: scope_hint: In function ‘ldap_str2structurerule’
openldap-2.6.10/openldap-2.6.10/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): [#def235]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/schema.c: scope_hint: In function ‘ldap_str2nameform’
openldap-2.6.10/openldap-2.6.10/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): [#def236]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def237]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:88:44: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ 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): [#def238]
openldap-2.6.10/openldap-2.6.10/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): [#def239]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:90:44: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def240]
openldap-2.6.10/openldap-2.6.10/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): [#def241]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:93:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ 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): [#def242]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:93:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ 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): [#def243]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:95:12: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def244]
openldap-2.6.10/openldap-2.6.10/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): [#def245]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:98:9: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def246]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:98:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def247]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c: scope_hint: In function ‘file_read’
openldap-2.6.10/openldap-2.6.10/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-401): [#def248]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  124|   
#  125|   	if (( fp = fopen( path, "r" )) == NULL ) {
#  126|-> 	    	perror( path );
#  127|   		return( -1 );
#  128|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  124|   
#  125|   	if (( fp = fopen( path, "r" )) == NULL ) {
#  126|-> 	    	perror( path );
#  127|   		return( -1 );
#  128|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  124|   
#  125|   	if (( fp = fopen( path, "r" )) == NULL ) {
#  126|-> 	    	perror( path );
#  127|   		return( -1 );
#  128|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  124|   
#  125|   	if (( fp = fopen( path, "r" )) == NULL ) {
#  126|-> 	    	perror( path );
#  127|   		return( -1 );
#  128|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:130:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  128|   	}
#  129|   
#  130|-> 	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|   		perror( path );
#  132|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:130:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  128|   	}
#  129|   
#  130|-> 	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|   		perror( path );
#  132|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:130:14: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  128|   	}
#  129|   
#  130|-> 	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|   		perror( path );
#  132|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:130:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  128|   	}
#  129|   
#  130|-> 	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|   		perror( path );
#  132|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:130:14: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  128|   	}
#  129|   
#  130|-> 	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|   		perror( path );
#  132|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:130:14: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  128|   	}
#  129|   
#  130|-> 	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|   		perror( path );
#  132|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def258]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:131:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  129|   
#  130|   	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|-> 		perror( path );
#  132|   		fclose( fp );
#  133|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  129|   
#  130|   	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|-> 		perror( path );
#  132|   		fclose( fp );
#  133|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  129|   
#  130|   	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|-> 		perror( path );
#  132|   		fclose( fp );
#  133|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  129|   
#  130|   	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|-> 		perror( path );
#  132|   		fclose( fp );
#  133|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  129|   
#  130|   	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|-> 		perror( path );
#  132|   		fclose( fp );
#  133|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  129|   
#  130|   	if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
#  131|-> 		perror( path );
#  132|   		fclose( fp );
#  133|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def264]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bv’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-775): [#def265]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def266]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def267]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:22: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def268]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def269]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:22: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-401): [#def270]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:136:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-775): [#def271]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:139:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {
#  139|-> 		perror( "malloc" );
#  140|   		fclose( fp );
#  141|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {
#  139|-> 		perror( "malloc" );
#  140|   		fclose( fp );
#  141|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {
#  139|-> 		perror( "malloc" );
#  140|   		fclose( fp );
#  141|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {
#  139|-> 		perror( "malloc" );
#  140|   		fclose( fp );
#  141|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {
#  139|-> 		perror( "malloc" );
#  140|   		fclose( fp );
#  141|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {
#  139|-> 		perror( "malloc" );
#  140|   		fclose( fp );
#  141|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:144:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  142|   	}
#  143|   
#  144|-> 	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|   		perror( path );
#  146|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:144:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  142|   	}
#  143|   
#  144|-> 	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|   		perror( path );
#  146|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:144:14: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  142|   	}
#  143|   
#  144|-> 	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|   		perror( path );
#  146|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:144:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  142|   	}
#  143|   
#  144|-> 	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|   		perror( path );
#  146|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:144:14: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  142|   	}
#  143|   
#  144|-> 	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|   		perror( path );
#  146|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:144:14: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  142|   	}
#  143|   
#  144|-> 	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|   		perror( path );
#  146|   		fclose( fp );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def283]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:145:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  143|   
#  144|   	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|-> 		perror( path );
#  146|   		fclose( fp );
#  147|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  143|   
#  144|   	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|-> 		perror( path );
#  146|   		fclose( fp );
#  147|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  143|   
#  144|   	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|-> 		perror( path );
#  146|   		fclose( fp );
#  147|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  143|   
#  144|   	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|-> 		perror( path );
#  146|   		fclose( fp );
#  147|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  143|   
#  144|   	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|-> 		perror( path );
#  146|   		fclose( fp );
#  147|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  143|   
#  144|   	if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
#  145|-> 		perror( path );
#  146|   		fclose( fp );
#  147|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  153|   
#  154|   	if ( (ber_len_t) rlen != bv->bv_len ) {
#  155|-> 		perror( path );
#  156|   		free( bv->bv_val );
#  157|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  153|   
#  154|   	if ( (ber_len_t) rlen != bv->bv_len ) {
#  155|-> 		perror( path );
#  156|   		free( bv->bv_val );
#  157|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  153|   
#  154|   	if ( (ber_len_t) rlen != bv->bv_len ) {
#  155|-> 		perror( path );
#  156|   		free( bv->bv_val );
#  157|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:382:47: call_function: calling ‘get_modlist’ from ‘main’
#  153|   
#  154|   	if ( (ber_len_t) rlen != bv->bv_len ) {
#  155|-> 		perror( path );
#  156|   		free( bv->bv_val );
#  157|   		return( -1 );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def293]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:197:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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-476): [#def294]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:202:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bvals’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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: CPPCHECK_WARNING (CWE-401): [#def295]
openldap-2.6.10/openldap-2.6.10/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): [#def296]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:212:55: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def297]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:215:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(16)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def298]
openldap-2.6.10/openldap-2.6.10/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): [#def299]
openldap-2.6.10/openldap-2.6.10/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): [#def300]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:230:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def301]
openldap-2.6.10/openldap-2.6.10/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): [#def302]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:231:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(24)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:272:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:12: branch_true: following ‘true’ branch (when ‘host’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:337:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:342:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:347:9: branch_false: following ‘false’ branch (when ‘host’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:352:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:357:12: branch_false: following ‘false’ branch (when ‘copyfname’ is NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:367:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: call_function: calling ‘get_line’ from ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: return_function: returning to ‘main’ from ‘get_line’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:371:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c:372:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def303]
openldap-2.6.10/openldap-2.6.10/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): [#def304]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/test.c: scope_hint: In function ‘main’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def305]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:92:28: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&name)’
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:55:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:56:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:89:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:91:31: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:92:54: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/libldap/testavl.c:92:28: danger: ‘strdup(&name)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   90|   				exit( EXIT_SUCCESS );
#   91|   			name[ strlen( name ) - 1 ] = '\0';
#   92|-> 			if ( ldap_avl_insert( &tree, strdup( name ), avl_strcmp, 
#   93|   			    ldap_avl_dup_error ) != 0 )
#   94|   				printf( "\nNot inserted!\n" );

Error: COMPILER_WARNING (CWE-563): [#def306]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/threads.c: scope_hint: In function ‘ldap_pvt_thread_initialize’
openldap-2.6.10/openldap-2.6.10/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): [#def307]
openldap-2.6.10/openldap-2.6.10/libraries/libldap/tls2.c: scope_hint: In function ‘ldap_int_tls_start’
openldap-2.6.10/openldap-2.6.10/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: [#def308]
openldap-2.6.10/openldap-2.6.10/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: [#def309]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING (CWE-401): [#def310]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def311]
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:167:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:157:5: enter_function: entry to ‘mdb_midl_append’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:161:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:162:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:162:21: call_function: calling ‘mdb_midl_grow’ from ‘mdb_midl_append’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:162:21: return_function: returning to ‘mdb_midl_append’ from ‘mdb_midl_grow’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:162:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:164:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def312]
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:181:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:171:5: enter_function: entry to ‘mdb_midl_append_list’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:175:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:176:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:176:21: call_function: calling ‘mdb_midl_grow’ from ‘mdb_midl_append_list’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:176:21: return_function: returning to ‘mdb_midl_append_list’ from ‘mdb_midl_grow’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:176:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:178:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def313]
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:196:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:185:5: enter_function: entry to ‘mdb_midl_append_range’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:189:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:190:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:190:21: call_function: calling ‘mdb_midl_grow’ from ‘mdb_midl_append_range’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:190:21: return_function: returning to ‘mdb_midl_append_range’ from ‘mdb_midl_grow’
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:190:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:192:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:196:16: branch_true: following ‘true’ branch (when ‘n != 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:197:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:196:16: branch_true: following ‘true’ branch (when ‘n != 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblmdb/midl.c:197:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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: COMPILER_WARNING (CWE-563): [#def314]
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ucstr.c: scope_hint: In function ‘UTF8bvnormalize’
openldap-2.6.10/openldap-2.6.10/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): [#def315]
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure.c:526:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rp’
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure.c:1690:1: enter_function: entry to ‘ure_compile’
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure.c:1698:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure.c:1716:17: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure.c:1720:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: CPPCHECK_WARNING (CWE-682): [#def316]
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure/ure.c:1116: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: 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): [#def317]
openldap-2.6.10/openldap-2.6.10/libraries/liblunicode/ure/ure.c:1337: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: 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): [#def318]
openldap-2.6.10/openldap-2.6.10/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): [#def319]
openldap-2.6.10/openldap-2.6.10/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): [#def320]
openldap-2.6.10/openldap-2.6.10/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): [#def321]
openldap-2.6.10/openldap-2.6.10/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): [#def322]
openldap-2.6.10/openldap-2.6.10/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): [#def323]
openldap-2.6.10/openldap-2.6.10/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): [#def324]
openldap-2.6.10/openldap-2.6.10/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): [#def325]
openldap-2.6.10/openldap-2.6.10/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): [#def326]
openldap-2.6.10/openldap-2.6.10/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): [#def327]
openldap-2.6.10/openldap-2.6.10/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: [#def328]
openldap-2.6.10/openldap-2.6.10/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: [#def329]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def330]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:106:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:71:12: branch_true: following ‘true’ branch (when ‘debug == 0’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:72:30: branch_true: following ‘true’ branch (when ‘i != 5’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:76:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:93:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:93:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:100:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:104:25: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:105:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:106:33: danger: ‘sd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  104|   			switch( sd ) {
#  105|   			default:
#  106|-> 				close( sd );
#  107|   			case STDIN_FILENO:
#  108|   			case STDOUT_FILENO:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def331]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:121:41: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:71:12: branch_true: following ‘true’ branch (when ‘debug == 0’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:72:30: branch_true: following ‘true’ branch (when ‘i != 5’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:76:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:93:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:93:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:100:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:104:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:114:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:114:20: branch_true: following ‘true’ branch (when ‘do_close != 0’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:116:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:117:35: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:117:35: branch_false: following ‘false’ branch (when ‘i <= 2’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:116:49: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:116:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:117:35: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:121:41: danger: ‘sd’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  119|   					i != STDERR_FILENO )
#  120|   				{
#  121|-> 					close( i );
#  122|   				}
#  123|   			}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def332]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:141:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:71:12: branch_true: following ‘true’ branch (when ‘debug == 0’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:72:30: branch_true: following ‘true’ branch (when ‘i != 5’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:76:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:93:28: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:93:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:100:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:104:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:114:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/detach.c:141:16: danger: ‘sd’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/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): [#def333]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/entropy.c:74:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/entropy.c:51:11: branch_false: following ‘false’ branch (when ‘nbytes != 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/entropy.c:59:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/entropy.c:59:22: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/entropy.c:61:19: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/entropy.c:74:24: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   72|   
#   73|   		close(fd);
#   74|-> 		return nbytes > 0 ? -1 : 0;
#   75|   	}
#   76|   #elif defined(PROV_RSA_FULL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def334]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:96:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:96:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:96:25: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   94|   	if (fi != stdin) {
#   95|   		if (GETATTR(fileno(fi), &ttyb) < 0)
#   96|-> 			perror("GETATTR");
#   97|   		sig = SIGNAL (SIGINT, SIG_IGN);
#   98|   		flags = GETFLAGS( ttyb );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:96:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:96:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:96:25: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   94|   	if (fi != stdin) {
#   95|   		if (GETATTR(fileno(fi), &ttyb) < 0)
#   96|-> 			perror("GETATTR");
#   97|   		sig = SIGNAL (SIGINT, SIG_IGN);
#   98|   		flags = GETFLAGS( ttyb );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def336]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:97:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:97:23: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   95|   		if (GETATTR(fileno(fi), &ttyb) < 0)
#   96|   			perror("GETATTR");
#   97|-> 		sig = SIGNAL (SIGINT, SIG_IGN);
#   98|   		flags = GETFLAGS( ttyb );
#   99|   		SETFLAGS( ttyb, flags & ~ECHO );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:97:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:97:23: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   95|   		if (GETATTR(fileno(fi), &ttyb) < 0)
#   96|   			perror("GETATTR");
#   97|-> 		sig = SIGNAL (SIGINT, SIG_IGN);
#   98|   		flags = GETFLAGS( ttyb );
#   99|   		SETFLAGS( ttyb, flags & ~ECHO );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def338]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:101:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:100:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:101:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:101:25: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   99|   		SETFLAGS( ttyb, flags & ~ECHO );
#  100|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  101|-> 			perror("SETATTR");
#  102|   	}
#  103|   #else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:101:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:100:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:101:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:101:25: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   99|   		SETFLAGS( ttyb, flags & ~ECHO );
#  100|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  101|-> 			perror("SETATTR");
#  102|   	}
#  103|   #else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def340]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:107:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:106:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:107:9: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  105|   #endif
#  106|   	fprintf(stderr, "%s", prompt); 
#  107|-> 	fflush(stderr);
#  108|   	i = 0;
#  109|   	while ( (c = getc(fi)) != EOF && c != '\n' && c != '\r' )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:107:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:106:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:107:9: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  105|   #endif
#  106|   	fprintf(stderr, "%s", prompt); 
#  107|-> 	fflush(stderr);
#  108|   	i = 0;
#  109|   	while ( (c = getc(fi)) != EOF && c != '\n' && c != '\r' )

Error: GCC_ANALYZER_WARNING (CWE-775): [#def342]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:116:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:115:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:116:17: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  114|   	if (fi != stdin) {
#  115|   		fprintf(stderr, "\n"); 
#  116|-> 		fflush(stderr);
#  117|   		SETFLAGS( ttyb, flags );
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:116:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:115:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:116:17: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  114|   	if (fi != stdin) {
#  115|   		fprintf(stderr, "\n"); 
#  116|-> 		fflush(stderr);
#  117|   		SETFLAGS( ttyb, flags );
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def344]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:119:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:115:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:118:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:119:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:119:25: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  117|   		SETFLAGS( ttyb, flags );
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  119|-> 			perror("SETATTR");
#  120|   		(void) SIGNAL (SIGINT, sig);
#  121|   		(void) fclose(fi);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:119:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:115:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:118:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:119:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:119:25: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  117|   		SETFLAGS( ttyb, flags );
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  119|-> 			perror("SETATTR");
#  120|   		(void) SIGNAL (SIGINT, sig);
#  121|   		(void) fclose(fi);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def346]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:120:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:115:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:120:24: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  119|   			perror("SETATTR");
#  120|-> 		(void) SIGNAL (SIGINT, sig);
#  121|   		(void) fclose(fi);
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:120:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:94:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:95:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:115:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:120:24: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  119|   			perror("SETATTR");
#  120|-> 		(void) SIGNAL (SIGINT, sig);
#  121|   		(void) fclose(fi);
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def348]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:125:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:124:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:124:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:125:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:125:23: danger: ‘fi’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/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): [#def349]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:125:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:90:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:114:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:124:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:124:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:125:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/getpass.c:125:23: danger: ‘fi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/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: [#def350]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/portable.h:1189: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/hash.c:22: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def351]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def352]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/portable.h:1189: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/md5.c:46: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/include/lutil_md5.h:49:23: note: previously declared as an array ‘unsigned char[16]’
#   49 |         unsigned char digest[16],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/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: [#def353]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def354]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def355]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:65:35: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:65:35: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   63|   #endif /* HAVE_FSTAT */
#   64|   
#   65|-> 	passwd->bv_val = (char *) ber_memalloc( passwd->bv_len + 1 );
#   66|   	if( passwd->bv_val == NULL ) {
#   67|   		perror( filename );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:65:35: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:65:35: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   63|   #endif /* HAVE_FSTAT */
#   64|   
#   65|-> 	passwd->bv_val = (char *) ber_memalloc( passwd->bv_len + 1 );
#   66|   	if( passwd->bv_val == NULL ) {
#   67|   		perror( filename );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def357]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:67:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:67:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:67:17: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   65|   	passwd->bv_val = (char *) ber_memalloc( passwd->bv_len + 1 );
#   66|   	if( passwd->bv_val == NULL ) {
#   67|-> 		perror( filename );
#   68|   		fclose( f );
#   69|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:67:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:67:17: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   65|   	passwd->bv_val = (char *) ber_memalloc( passwd->bv_len + 1 );
#   66|   	if( passwd->bv_val == NULL ) {
#   67|-> 		perror( filename );
#   68|   		fclose( f );
#   69|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def359]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:77:44: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:73:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:75:19: branch_true: following ‘true’ branch (when ‘nleft == 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:78:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:77:44: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   75|   		if( nleft == 0 ) {
#   76|   			/* double the buffer size */
#   77|-> 			char *p = (char *) ber_memrealloc( passwd->bv_val,
#   78|   				2 * passwd->bv_len + 1 );
#   79|   			if( p == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:77:44: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:73:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:75:19: branch_true: following ‘true’ branch (when ‘nleft == 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:78:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:77:44: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   75|   		if( nleft == 0 ) {
#   76|   			/* double the buffer size */
#   77|-> 			char *p = (char *) ber_memrealloc( passwd->bv_val,
#   78|   				2 * passwd->bv_len + 1 );
#   79|   			if( p == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def361]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:80:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:73:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:80:33: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   78|   				2 * passwd->bv_len + 1 );
#   79|   			if( p == NULL ) {
#   80|-> 				ber_memfree( passwd->bv_val );
#   81|   				passwd->bv_val = NULL;
#   82|   				passwd->bv_len = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:80:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:73:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:80:33: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   78|   				2 * passwd->bv_len + 1 );
#   79|   			if( p == NULL ) {
#   80|-> 				ber_memfree( passwd->bv_val );
#   81|   				passwd->bv_val = NULL;
#   82|   				passwd->bv_len = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def363]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:94:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:73:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:75:19: branch_false: following ‘false’ branch (when ‘nleft != 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:91:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:93:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:94:25: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   92|   
#   93|   		if( nr < nleft && ferror( f ) ) {
#   94|-> 			ber_memfree( passwd->bv_val );
#   95|   			passwd->bv_val = NULL;
#   96|   			passwd->bv_len = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:94:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:39:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:41:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:46:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:66:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:73:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:75:19: branch_false: following ‘false’ branch (when ‘nleft != 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:91:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:93:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/passfile.c:94:25: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#   92|   
#   93|   		if( nr < nleft && ferror( f ) ) {
#   94|-> 			ber_memfree( passwd->bv_val );
#   95|   			passwd->bv_val = NULL;
#   96|   			passwd->bv_len = 0;

Error: COMPILER_WARNING: [#def365]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/portable.h:1189: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/sha1.c:39: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def366]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def367]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def368]
openldap-2.6.10/openldap-2.6.10/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): [#def369]
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/utils.c:778:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘j’
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/utils.c:763:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/utils.c:764:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/utils.c:764:40: branch_false: following ‘false’ branch (when ‘i < 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/liblutil/utils.c:778:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: [#def370]
openldap-2.6.10/openldap-2.6.10/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: [#def371]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING (CWE-457): [#def372]
openldap-2.6.10/openldap-2.6.10/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): [#def373]
openldap-2.6.10/openldap-2.6.10/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): [#def374]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:136:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:99:9: branch_true: following ‘true’ branch (when ‘fname’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:100:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:100:9: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:102:16: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:103:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:107:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:107:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:115:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:121:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:126:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:126:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/ldapmap.c:135:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def375]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:172:23: warning[-Wanalyzer-null-argument]: use of NULL ‘begin’ where non-null expected
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:48:9: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:49:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:49:9: branch_true: following ‘true’ branch (when ‘string’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:50:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:50:9: branch_true: following ‘true’ branch (when ‘currpos’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:52:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:57:36: branch_true: following ‘true’ branch (when ‘cnt != 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:58:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:81:12: branch_false: following ‘false’ branch (when ‘cnt == 0’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:84:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:91:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:94:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:152:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/map.c:156:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def376]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:52:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:126:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:183:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:59: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:9: branch_true: following ‘true’ branch (when ‘fin’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:9: call_function: calling ‘apply’ from ‘main’
#   50|   	void *cookie = &info;
#   51|   
#   52|-> 	info = rewrite_info_init( REWRITE_MODE_ERR );
#   53|   
#   54|   	if ( rewrite_read( fin, info ) != 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:52:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:126:1: enter_function: entry to ‘main’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:183:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:59: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:9: branch_true: following ‘true’ branch (when ‘fin’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:187:9: call_function: calling ‘apply’ from ‘main’
#   50|   	void *cookie = &info;
#   51|   
#   52|-> 	info = rewrite_info_init( REWRITE_MODE_ERR );
#   53|   
#   54|   	if ( rewrite_read( fin, info ) != 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def378]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:30: danger: ‘fin’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  139|   		switch ( opt ) {
#  140|   		case 'd':
#  141|-> 			if ( lutil_atoi( &debug, optarg ) != 0 ) {
#  142|   				fprintf( stderr, "illegal log level '%s'\n",
#  143|   						optarg );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:30: danger: ‘fin’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  139|   		switch ( opt ) {
#  140|   		case 'd':
#  141|-> 			if ( lutil_atoi( &debug, optarg ) != 0 ) {
#  142|   				fprintf( stderr, "illegal log level '%s'\n",
#  143|   						optarg );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def380]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: danger: ‘fin’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  177|   	
#  178|   	if ( debug != 0 ) {
#  179|-> 		ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &debug);
#  180|   		ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
#  181|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: danger: ‘fin’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  177|   	
#  178|   	if ( debug != 0 ) {
#  179|-> 		ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &debug);
#  180|   		ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
#  181|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def382]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:180:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:180:17: danger: ‘fin’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  178|   	if ( debug != 0 ) {
#  179|   		ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &debug);
#  180|-> 		ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
#  181|   	}
#  182|   	

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:180:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fin’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:135:20: branch_false: following ‘false’ branch (when ‘opt != -1’)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:139:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:149:31: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:150:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:141:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:178:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:179:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/rewrite.c:180:17: danger: ‘fin’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  178|   	if ( debug != 0 ) {
#  179|   		ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &debug);
#  180|-> 		ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
#  181|   	}
#  182|   	

Error: CPPCHECK_WARNING (CWE-457): [#def384]
openldap-2.6.10/openldap-2.6.10/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): [#def385]
openldap-2.6.10/openldap-2.6.10/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): [#def386]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:318:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘submatch’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:275:1: enter_function: entry to ‘rewrite_subst_apply’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:289:9: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:290:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:290:9: branch_true: following ‘true’ branch (when ‘op’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:291:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:291:9: branch_true: following ‘true’ branch (when ‘subst’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:292:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:292:9: branch_true: following ‘true’ branch (when ‘string’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:293:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:293:9: branch_true: following ‘true’ branch (when ‘match’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:294:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:294:9: branch_true: following ‘true’ branch (when ‘val’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:296:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:296:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:298:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:304:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:305:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:307:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:315:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:315:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:316:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:326:30: call_function: calling ‘submatch_copy’ from ‘rewrite_subst_apply’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:326:30: return_function: returning to ‘rewrite_subst_apply’ from ‘submatch_copy’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:328:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:367:26: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:315:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/subst.c:316:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def387]
openldap-2.6.10/openldap-2.6.10/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: [#def388]
openldap-2.6.10/openldap-2.6.10/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: [#def389]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def390]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:140:22: warning[-Wanalyzer-file-leak]: leak of FILE
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:54:9: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:55:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:55:9: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:56:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:56:9: branch_true: following ‘true’ branch (when ‘currpos’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:58:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:74:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:74:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:102:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:102:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:108:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:110:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:117:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:117:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:122:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:123:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:128:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:130:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:134:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:137:42: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:140:22: danger: leaks here; was opened at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
#  138|   		free( filename );
#  139|   
#  140|-> 		if ( map->lm_args == NULL ) {
#  141|   			free( map );
#  142|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:140:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:54:9: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:55:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:55:9: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:56:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:56:9: branch_true: following ‘true’ branch (when ‘currpos’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:58:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:64:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:74:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:74:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:102:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:102:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:108:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:110:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:117:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:117:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:122:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:123:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:128:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:130:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:134:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:137:42: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/libraries/librewrite/xmap.c:140:22: danger: ‘<unknown>’ leaks here; was allocated at [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20)
#  138|   		free( filename );
#  139|   
#  140|-> 		if ( map->lm_args == NULL ) {
#  141|   			free( map );
#  142|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def392]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:111:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:119:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:122:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:8: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: danger: ‘s’ leaks here
#  133|       }
#  134|   
#  135|->     if ( ber_pvt_socket_set_nonblock( s, 1 ) ) {
#  136|           goto fail;
#  137|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def393]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:236:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:111:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:119:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:122:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:8: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:140:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:225:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:232:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:236:13: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:236:13: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:236:13: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:236:13: danger: ‘s’ leaks here
#  234|   
#  235|           if ( errno != EINPROGRESS && errno != EWOULDBLOCK ) {
#  236|->             Debug( LDAP_DEBUG_ANY, "upstream_name_cb: "
#  237|                       "failed to connect to server '%s'\n",
#  238|                       b->b_uri.bv_val );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def394]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:239:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:111:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:119:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:122:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:8: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:140:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:225:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:232:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:236:13: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:239:13: danger: ‘s’ leaks here
#  237|                       "failed to connect to server '%s'\n",
#  238|                       b->b_uri.bv_val );
#  239|->             evutil_closesocket( s );
#  240|               goto fail;
#  241|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def395]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:243:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:111:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:119:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:122:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:8: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:140:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:225:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:232:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:243:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:243:16: danger: ‘s’ leaks here
#  241|           }
#  242|   
#  243|->         conn = ch_calloc( 1, sizeof(LloadPendingConnection) );
#  244|           LDAP_LIST_ENTRY_INIT( conn, next );
#  245|           conn->backend = b;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def396]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:248:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:111:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:115:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:119:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:122:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:15: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:130:8: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:135:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:140:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:225:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:232:8: branch_true: following ‘true’ branch (when ‘rc != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:235:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:243:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:248:23: danger: ‘s’ leaks here
#  246|           conn->fd = s;
#  247|   
#  248|->         conn->event = event_new( lload_get_base( s ), s, EV_WRITE|EV_PERSIST,
#  249|                   upstream_connect_cb, conn );
#  250|           if ( !conn->event ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def397]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:518:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:486:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:489:10: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:493:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:501:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:509:8: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:514:12: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:518:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:518:14: danger: ‘s’ leaks here
#  516|           }
#  517|   
#  518|->         rc = ber_pvt_socket_set_nonblock( s, 1 );
#  519|           if ( rc ) {
#  520|               evutil_closesocket( s );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def398]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:539:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:486:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:489:10: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:493:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:501:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:509:8: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:514:12: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:518:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:519:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:524:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:524:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:528:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:532:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:535:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:538:18: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:538:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:539:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:539:17: danger: ‘s’ leaks here
#  537|   
#  538|               if ( errno != EINPROGRESS && errno != EWOULDBLOCK ) {
#  539|->                 evutil_closesocket( s );
#  540|                   goto fail;
#  541|               }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def399]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:543:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:486:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:489:10: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:493:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:501:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:509:8: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:514:12: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:518:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:519:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:524:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:524:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:528:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:532:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:535:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:538:18: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:538:16: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:543:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:543:20: danger: ‘s’ leaks here
#  541|               }
#  542|   
#  543|->             conn = ch_calloc( 1, sizeof(LloadPendingConnection) );
#  544|               LDAP_LIST_ENTRY_INIT( conn, next );
#  545|               conn->backend = b;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def400]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:548:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:486:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:487:5: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:489:10: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:493:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:501:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:509:8: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:511:26: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:514:12: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:518:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:519:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:524:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:524:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:528:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:532:14: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:535:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:538:18: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:538:16: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:543:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/backend.c:548:27: danger: ‘s’ leaks here
#  546|               conn->fd = s;
#  547|   
#  548|->             conn->event = event_new( lload_get_base( s ), s,
#  549|                       EV_WRITE|EV_PERSIST, upstream_connect_cb, conn );
#  550|               if ( !conn->event ) {

Error: GCC_ANALYZER_WARNING (CWE-131): [#def401]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/servers/lloadd/client.c:550:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:555:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:586:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:592:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:595:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:601:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:603:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:605:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:626:5: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/client.c:627:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def402]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-476): [#def403]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:1636:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argv’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:1686:1: enter_function: entry to ‘tcp_buffer_delete_one’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:1692:10: call_function: calling ‘tcp_buffer_parse’ from ‘tcp_buffer_delete_one’
# 1634|   
# 1635|       i = 0;
# 1636|->     if ( strncasecmp( argv[i], "listener=", STRLENOF("listener=") ) == 0 ) {
# 1637|           char *url = argv[i] + STRLENOF("listener=");
# 1638|   

Error: COMPILER_WARNING (CWE-681): [#def404]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c: scope_hint: In function ‘lload_config_find_keyword’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/portable.h:1189: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:27: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/include/lutil.h:55:9: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#   55 |         unsigned char *,
#      |         ^~~~~~~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def405]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2577:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2581:8: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2591:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2612:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 2622|       }
# 2623|   
# 2624|->     Debug( LDAP_DEBUG_CONFIG, "reading config file %s\n", fname );
# 2625|   
# 2626|       fp_getline_init( c );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2577:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2581:8: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2591:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2612:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 2622|       }
# 2623|   
# 2624|->     Debug( LDAP_DEBUG_CONFIG, "reading config file %s\n", fname );
# 2625|   
# 2626|       fp_getline_init( c );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def407]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:3495:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2564:1: enter_function: entry to ‘lload_read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2577:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2581:8: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2591:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2612:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2630:13: call_function: calling ‘fp_getline’ from ‘lload_read_config_file’
# 3493|   
# 3494|       lcur = 0;
# 3495|->     CATLINE( buf );
# 3496|       c->lineno++;
# 3497|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:3495:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2564:1: enter_function: entry to ‘lload_read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2577:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2581:8: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2591:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2612:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2630:13: call_function: calling ‘fp_getline’ from ‘lload_read_config_file’
# 3493|   
# 3494|       lcur = 0;
# 3495|->     CATLINE( buf );
# 3496|       c->lineno++;
# 3497|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def409]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:3526:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2564:1: enter_function: entry to ‘lload_read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2577:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2581:8: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2591:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2612:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2630:13: call_function: calling ‘fp_getline’ from ‘lload_read_config_file’
# 3524|               buf[0] = ' ';
# 3525|           }
# 3526|->         CATLINE( buf );
# 3527|           c->lineno++;
# 3528|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:3526:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2564:1: enter_function: entry to ‘lload_read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2577:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2581:8: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2591:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:11: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2603:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2611:10: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2612:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2624:5: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/config.c:2630:13: call_function: calling ‘fp_getline’ from ‘lload_read_config_file’
# 3524|               buf[0] = ' ';
# 3525|           }
# 3526|->         CATLINE( buf );
# 3527|           c->lineno++;
# 3528|       }

Error: CPPCHECK_WARNING (CWE-476): [#def411]
openldap-2.6.10/openldap-2.6.10/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): [#def412]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:257:14: warning[-Wanalyzer-null-argument]: use of NULL ‘host’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:372:1: enter_function: entry to ‘lload_open_listener’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:395:5: branch_true: following ‘true’ branch (when ‘url’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:396:5: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:396:5: branch_true: following ‘true’ branch (when ‘lud’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:398:5: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:427:8: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:443:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def413]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:506:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:372:1: enter_function: entry to ‘lload_open_listener’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:395:5: branch_true: following ‘true’ branch (when ‘url’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:396:5: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:396:5: branch_true: following ‘true’ branch (when ‘lud’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:398:5: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:427:8: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:429:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:430:19: call_function: calling ‘lload_get_listener_addresses’ from ‘lload_open_listener’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:430:19: return_function: returning to ‘lload_open_listener’ from ‘lload_get_listener_addresses’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:460:8: branch_false: following ‘false’ branch (when ‘err == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:476:13: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:478:18: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:497:13: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:498:12: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:506:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:506:9: danger: ‘s’ leaks here
#  504|               continue;
#  505|           }
#  506|->         ber_pvt_socket_set_nonblock( s, 1 );
#  507|           l.sl_sd = s;
#  508|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def414]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:1976:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**lload_listeners.sl_sd’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:1973:18: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:1974:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def415]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:1976:47: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**lload_listeners.sl_sd’
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:1973:18: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/lloadd/daemon.c:1974:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def416]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/monitor.c: scope_hint: In function ‘lload_monitor_conn_update’
openldap-2.6.10/openldap-2.6.10/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): [#def417]
openldap-2.6.10/openldap-2.6.10/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): [#def418]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/monitor.c: scope_hint: In function ‘lload_monitor_conn_entry_create’
openldap-2.6.10/openldap-2.6.10/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): [#def419]
openldap-2.6.10/openldap-2.6.10/servers/lloadd/operation.c: scope_hint: In function ‘operation_unlink’
openldap-2.6.10/openldap-2.6.10/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): [#def420]
openldap-2.6.10/openldap-2.6.10/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: [#def421]
openldap-2.6.10/openldap-2.6.10/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: [#def422]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def423]
openldap-2.6.10/openldap-2.6.10/servers/slapd/acl.c: scope_hint: In function ‘slap_acl_mask’
openldap-2.6.10/openldap-2.6.10/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: [#def424]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c: scope_hint: In function ‘regtest’
openldap-2.6.10/openldap-2.6.10/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): [#def425]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.10/openldap-2.6.10/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: [#def426]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.10/openldap-2.6.10/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: [#def427]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.10/openldap-2.6.10/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): [#def428]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2489:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ptr’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2688:1: enter_function: entry to ‘acl_unparse’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2703:15: call_function: calling ‘safe_strcopy’ from ‘acl_unparse’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2703:15: return_function: returning to ‘acl_unparse’ from ‘safe_strcopy’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2762:23: call_function: calling ‘safe_strcopy’ from ‘acl_unparse’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2762:23: return_function: returning to ‘acl_unparse’ from ‘safe_strcopy’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2765:34: branch_true: following ‘true’ branch (when ‘b’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2766:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2766:23: call_function: calling ‘access2text’ from ‘acl_unparse’
# 2487|   dnaccess2text( slap_dn_access *bdn, char *ptr, int is_realdn )
# 2488|   {
# 2489|-> 	*ptr++ = ' ';
# 2490|   
# 2491|   	if ( is_realdn ) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def429]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2669:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maskbuf[0]’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2775:1: enter_function: entry to ‘print_acl’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2779:9: call_function: calling ‘acl_unparse’ from ‘print_acl’
# 2667|   	}
# 2668|   	ptr = acl_safe_strcopy( ptr, accessmask2str( b->a_access_mask, maskbuf, 0 ));
# 2669|-> 	if ( !maskbuf[0] ) ptr--;
# 2670|   
# 2671|   	if( b->a_type == ACL_BREAK ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2768:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ptr’
openldap-2.6.10/openldap-2.6.10/servers/slapd/aclparse.c:2775:1: enter_function: entry to ‘print_acl’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def431]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:203:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  201|   		options = NULL;
#  202|   	}
#  203|-> 	desc.ad_type = at_bvfind( &desc.ad_cname );
#  204|   	if( desc.ad_type == NULL ) {
#  205|   		*text = "attribute type undefined";

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:203:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  201|   		options = NULL;
#  202|   	}
#  203|-> 	desc.ad_type = at_bvfind( &desc.ad_cname );
#  204|   	if( desc.ad_type == NULL ) {
#  205|   		*text = "attribute type undefined";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def433]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:350:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  348|   	while (d2 == NULL) {
#  349|   		size_t dlen = 0;
#  350|-> 		ldap_pvt_thread_mutex_lock( &desc.ad_type->sat_ad_mutex );
#  351|   		/* check again now that we've locked */
#  352|   		for (d2 = desc.ad_type->sat_ad; d2; d2=d2->ad_next) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:350:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  348|   	while (d2 == NULL) {
#  349|   		size_t dlen = 0;
#  350|-> 		ldap_pvt_thread_mutex_lock( &desc.ad_type->sat_ad_mutex );
#  351|   		/* check again now that we've locked */
#  352|   		for (d2 = desc.ad_type->sat_ad; d2; d2=d2->ad_next) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def435]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:930:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  928|   	
#  929|   	/* protect the input string from strtok */
#  930|-> 	str = ch_strdup( in );
#  931|   
#  932|   	/* Count words in string */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:930:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  928|   	
#  929|   	/* protect the input string from strtok */
#  930|-> 	str = ch_strdup( in );
#  931|   
#  932|   	/* Count words in string */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def437]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:940:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  938|   	}
#  939|   
#  940|-> 	an = ch_realloc( an, ( i + j + 1 ) * sizeof( AttributeName ) );
#  941|   	anew = an + i;
#  942|   	for ( s = ldap_pvt_strtok( str, brkstr, &lasts );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:940:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  938|   	}
#  939|   
#  940|-> 	an = ch_realloc( an, ( i + j + 1 ) * sizeof( AttributeName ) );
#  941|   	anew = an + i;
#  942|   	for ( s = ldap_pvt_strtok( str, brkstr, &lasts );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def439]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:942:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  940|   	an = ch_realloc( an, ( i + j + 1 ) * sizeof( AttributeName ) );
#  941|   	anew = an + i;
#  942|-> 	for ( s = ldap_pvt_strtok( str, brkstr, &lasts );
#  943|   		s != NULL;
#  944|   		s = ldap_pvt_strtok( NULL, brkstr, &lasts ) )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:942:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  940|   	an = ch_realloc( an, ( i + j + 1 ) * sizeof( AttributeName ) );
#  941|   	anew = an + i;
#  942|-> 	for ( s = ldap_pvt_strtok( str, brkstr, &lasts );
#  943|   		s != NULL;
#  944|   		s = ldap_pvt_strtok( NULL, brkstr, &lasts ) )

Error: GCC_ANALYZER_WARNING (CWE-775): [#def441]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:952:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  950|   		anew->an_oc = NULL;
#  951|   		anew->an_flags = 0;
#  952|-> 		ber_str2bv(s, 0, 1, &anew->an_name);
#  953|   		slap_bv2ad(&anew->an_name, &anew->an_desc, &text);
#  954|   		if ( !anew->an_desc ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:952:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1136:1: enter_function: entry to ‘file2anlist’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1164:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1183:22: call_function: calling ‘str2anlist’ from ‘file2anlist’
#  950|   		anew->an_oc = NULL;
#  951|   		anew->an_flags = 0;
#  952|-> 		ber_str2bv(s, 0, 1, &anew->an_name);
#  953|   		slap_bv2ad(&anew->an_name, &anew->an_desc, &text);
#  954|   		if ( !anew->an_desc ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def443]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1152|   	}
# 1153|   
# 1154|-> 	lcur = line = (char *) ch_malloc( lmax );
# 1155|   	if ( !line ) {
# 1156|   		Debug( LDAP_DEBUG_ANY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1152|   	}
# 1153|   
# 1154|-> 	lcur = line = (char *) ch_malloc( lmax );
# 1155|   	if ( !line ) {
# 1156|   		Debug( LDAP_DEBUG_ANY,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def445]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1154|   	lcur = line = (char *) ch_malloc( lmax );
# 1155|   	if ( !line ) {
# 1156|-> 		Debug( LDAP_DEBUG_ANY,
# 1157|   			"get_attrs_from_file: could not allocate memory\n" );
# 1158|   		fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1156:17: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1154|   	lcur = line = (char *) ch_malloc( lmax );
# 1155|   	if ( !line ) {
# 1156|-> 		Debug( LDAP_DEBUG_ANY,
# 1157|   			"get_attrs_from_file: could not allocate memory\n" );
# 1158|   		fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def447]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1173:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_false: following ‘false’ branch (when ‘c’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1172:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1173:41: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 1171|   		} else {
# 1172|   			lmax += LBUFSIZ;
# 1173|-> 			line = (char *) ch_realloc( line, lmax );
# 1174|   			if ( !line ) {
# 1175|   				Debug( LDAP_DEBUG_ANY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1173:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_false: following ‘false’ branch (when ‘c’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1172:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1173:41: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 1171|   		} else {
# 1172|   			lmax += LBUFSIZ;
# 1173|-> 			line = (char *) ch_realloc( line, lmax );
# 1174|   			if ( !line ) {
# 1175|   				Debug( LDAP_DEBUG_ANY,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def449]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_false: following ‘false’ branch (when ‘c’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1172:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 1173|   			line = (char *) ch_realloc( line, lmax );
# 1174|   			if ( !line ) {
# 1175|-> 				Debug( LDAP_DEBUG_ANY,
# 1176|   					"get_attrs_from_file: could not allocate memory\n" );
# 1177|   				fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1162:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1163:20: branch_false: following ‘false’ branch (when ‘c’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1172:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1175:33: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 1173|   			line = (char *) ch_realloc( line, lmax );
# 1174|   			if ( !line ) {
# 1175|-> 				Debug( LDAP_DEBUG_ANY,
# 1176|   					"get_attrs_from_file: could not allocate memory\n" );
# 1177|   				fclose(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def451]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1188:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1188:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 1186|   		lcur = line;
# 1187|   	}
# 1188|-> 	ch_free( line );
# 1189|   	fclose(fp);
# 1190|   	return an;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1188:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1144:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1154:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1155:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/ad.c:1188:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 1186|   		lcur = line;
# 1187|   	}
# 1188|-> 	ch_free( line );
# 1189|   	fclose(fp);
# 1190|   	return an;

Error: COMPILER_WARNING (CWE-563): [#def453]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/add.c: scope_hint: In function ‘asyncmeta_back_add’
openldap-2.6.10/openldap-2.6.10/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): [#def454]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/compare.c: scope_hint: In function ‘asyncmeta_back_compare’
openldap-2.6.10/openldap-2.6.10/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): [#def455]
openldap-2.6.10/openldap-2.6.10/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): [#def456]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:601:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def457]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:672:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def458]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:709:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def459]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:718:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1028:1: enter_function: entry to ‘asyncmeta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: [#def460]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_subtree_config’
openldap-2.6.10/openldap-2.6.10/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): [#def461]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1124:53: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1121:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def462]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1136:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def463]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1162:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def464]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1172:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def465]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1176:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def466]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1180:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def467]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1193:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def468]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1204:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def469]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1238:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def470]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1245:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def471]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1250:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def472]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1264:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def473]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1290:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def474]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1316:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def475]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1514:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1059:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def476]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1589:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def477]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1593:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def478]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1613:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1607:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1613:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def479]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1618:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def480]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1622:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def481]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1626:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def482]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1630:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def483]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1641:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def484]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1657:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1651:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1657:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def485]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1663:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def486]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1668:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def487]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1672:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def488]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1685:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1679:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1685:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def489]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1706:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1699:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1705:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1705:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1706:46: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def490]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1712:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1699:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1705:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1705:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1712:46: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def491]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1765:71: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def492]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1790:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1789:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1790:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def493]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1794:67: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1553:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1789:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1794:43: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def494]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1916:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘uris’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1884:35: release_memory: ‘uris’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1886:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1893:30: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1914:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1916:34: release_memory: ‘uris’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1916:34: release_memory: ‘uris’ is NULL
openldap-2.6.10/openldap-2.6.10/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: [#def495]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/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): [#def496]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2218:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2211:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2218:42: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def497]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2245:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def498]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2247:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2244:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/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): [#def499]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2253:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def500]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2255:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2252:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/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): [#def501]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2268:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2261:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2268:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def502]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2296:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2289:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2296:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def503]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2359:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2352:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2359:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def504]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2406:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def505]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2434:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2433:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2434:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def506]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2436:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2433:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2436:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def507]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2464:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def508]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2475:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2468:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2475:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def509]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2481:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2480:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2481:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def510]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2483:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2480:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2483:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def511]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2490:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2489:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2490:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def512]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2492:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1036:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1038:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1051:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1058:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1551:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1847:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1867:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1871:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1872:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:1879:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2489:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/config.c:2492:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def513]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/delete.c: scope_hint: In function ‘asyncmeta_back_delete’
openldap-2.6.10/openldap-2.6.10/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): [#def514]
openldap-2.6.10/openldap-2.6.10/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): [#def515]
openldap-2.6.10/openldap-2.6.10/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): [#def516]
openldap-2.6.10/openldap-2.6.10/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: [#def517]
openldap-2.6.10/openldap-2.6.10/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): [#def518]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/modify.c: scope_hint: In function ‘asyncmeta_back_modify’
openldap-2.6.10/openldap-2.6.10/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): [#def519]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/modrdn.c: scope_hint: In function ‘asyncmeta_back_modrdn’
openldap-2.6.10/openldap-2.6.10/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): [#def520]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/search.c: scope_hint: In function ‘asyncmeta_back_search’
openldap-2.6.10/openldap-2.6.10/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: [#def521]
openldap-2.6.10/openldap-2.6.10/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: [#def522]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def523]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:42:19: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:44:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:55:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:55:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:64:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:64:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:76:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:85:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:87:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:93:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def524]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:114:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:42:19: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:44:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:55:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:55:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:64:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:64:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:76:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:85:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:87:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:93:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:109:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:114:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:114:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/referral.c:114:9: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def525]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:45:19: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:48:9: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:50:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:64:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:68:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:74:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:74:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:85:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:95:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:102:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def526]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:124:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:45:19: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:48:9: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:50:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:64:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:68:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:74:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:74:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:85:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:93:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:95:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:102:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:119:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:124:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:124:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-dnssrv/search.c:124:9: release_memory: ‘urls’ is NULL
openldap-2.6.10/openldap-2.6.10/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: [#def527]
openldap-2.6.10/openldap-2.6.10/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: [#def528]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-457): [#def529]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/meta_result.c:31: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-asyncmeta/meta_result.c: scope_hint: In function ‘asyncmeta_op_handle_result’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: CPPCHECK_WARNING (CWE-562): [#def530]
openldap-2.6.10/openldap-2.6.10/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): [#def531]
openldap-2.6.10/openldap-2.6.10/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): [#def532]
openldap-2.6.10/openldap-2.6.10/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): [#def533]
openldap-2.6.10/openldap-2.6.10/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): [#def534]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:2062:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1318:1: enter_function: entry to ‘chain_ldadd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1331:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1332:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1333:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1339:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1341:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1342:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1347:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1349:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1374:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1375:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def535]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:2097:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1318:1: enter_function: entry to ‘chain_ldadd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1331:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1332:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1333:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1331:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1339:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1341:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1342:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1347:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1349:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1374:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:1382:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def536]
openldap-2.6.10/openldap-2.6.10/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): [#def537]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:2179:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:2164:17: branch_false: following ‘false’ branch (when ‘edge’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:2176:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def538]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c: scope_hint: In function ‘ldap_chain_connection_destroy’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/chain.c:2179:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
# 2179 |         return rc;
#      |                ^~
openldap-2.6.10/openldap-2.6.10/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): [#def539]
openldap-2.6.10/openldap-2.6.10/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): [#def540]
openldap-2.6.10/openldap-2.6.10/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): [#def541]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:945:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1387:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1387:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1555:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1572:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1619:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1648:33: branch_true: following ‘true’ branch (when ‘tmpludp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1653:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1664:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/config.c:1669:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def542]
openldap-2.6.10/openldap-2.6.10/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): [#def543]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘distproc_cfadd’
openldap-2.6.10/openldap-2.6.10/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): [#def544]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:841:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:362:1: enter_function: entry to ‘distproc_ldadd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:375:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:376:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:375:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:377:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:375:14: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:383:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:385:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:386:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:391:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:393:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:404:21: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:415:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:415:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:419:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def545]
openldap-2.6.10/openldap-2.6.10/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): [#def546]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:880:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:867:17: branch_false: following ‘false’ branch (when ‘edge’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:877:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def547]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘ldap_distproc_connection_destroy’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/distproc.c:880:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  880 |         return rc;
#      |                ^~
openldap-2.6.10/openldap-2.6.10/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): [#def548]
openldap-2.6.10/openldap-2.6.10/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): [#def549]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/extended.c: scope_hint: In function ‘ldap_back_exop_passwd’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/ac/fdset.h:32: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/include/portable.h:1187: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/extended.c:22: included_from: Included from here.
/usr/include/bits/string_fortified.h:89:16: note: expected ‘char *’ but argument is of type ‘const char *’
#   89 | __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): [#def550]
openldap-2.6.10/openldap-2.6.10/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): [#def551]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/extended.c: scope_hint: In function ‘ldap_back_exop_generic’
openldap-2.6.10/openldap-2.6.10/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:89:16: note: expected ‘char *’ but argument is of type ‘const char *’
#   89 | __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): [#def552]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldap/monitor.c: scope_hint: In function ‘ldap_back_monitor_db_close’
openldap-2.6.10/openldap-2.6.10/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: [#def553]
openldap-2.6.10/openldap-2.6.10/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: [#def554]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def555]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def556]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldif/ldif.c:840:32: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*path.bv_val)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldif/ldif.c:1944:1: enter_function: entry to ‘ldif_tool_entry_first_x’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldif/ldif.c:1952:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldif/ldif.c:1953:27: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldif/ldif.c:1959:22: call_function: calling ‘search_tree’ from ‘ldif_tool_entry_first_x’
#  838|   		int save_errno = 0;
#  839|   
#  840|-> 		while ( (dir = readdir( dir_of_path )) != NULL ) {
#  841|   			size_t fname_len;
#  842|   			bvlist *bvl, **prev;

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

Error: CPPCHECK_WARNING (CWE-562): [#def560]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-ldif/ldif.c:1814: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1812|   done:
# 1813|   	ldap_pvt_thread_mutex_unlock( &li->li_modop_mutex );
# 1814|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1815|   	rs->sr_err = rc;
# 1816|   	send_ldap_result( op, rs );

Error: COMPILER_WARNING: [#def561]
openldap-2.6.10/openldap-2.6.10/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: [#def562]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def563]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:435:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:193:1: enter_function: entry to ‘mdb_attr_index_config’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:209:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:216:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:216:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:217:27: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:219:19: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:238:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:251:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:255:11: branch_false: following ‘false’ branch (when ‘mask != 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:267:22: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:276:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:276:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:304:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:307:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:324:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:324:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:431:22: call_function: calling ‘ainfo_insert’ from ‘mdb_attr_index_config’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:431:22: return_function: returning to ‘mdb_attr_index_config’ from ‘ainfo_insert’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:432:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:433:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:433:39: call_function: calling ‘mdb_attr_mask’ from ‘mdb_attr_index_config’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:433:39: return_function: returning to ‘mdb_attr_index_config’ from ‘mdb_attr_mask’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:435:33: danger: dereference of NULL ‘mdb_attr_mask(mdb,  ad)’
#  433|   			AttrInfo *b = mdb_attr_mask( mdb, ad );
#  434|   			/* If this is just a multival record, reuse it for index info */
#  435|-> 			if ( !( b->ai_indexmask || b->ai_newmask ) && b->ai_multi_lo < UINT_MAX ) {
#  436|   				b->ai_indexmask = a->ai_indexmask;
#  437|   				b->ai_newmask = a->ai_newmask;

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def565]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:598:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:521:1: enter_function: entry to ‘mdb_attr_multi_config’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:536:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:543:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:544:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:548:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:551:12: branch_false: following ‘false’ branch (when ‘hi >= lo’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:560:22: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:565:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:565:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:571:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:574:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:588:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:594:22: call_function: calling ‘ainfo_insert’ from ‘mdb_attr_multi_config’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:594:22: return_function: returning to ‘mdb_attr_multi_config’ from ‘ainfo_insert’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:595:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:596:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:596:39: call_function: calling ‘mdb_attr_mask’ from ‘mdb_attr_multi_config’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:596:39: return_function: returning to ‘mdb_attr_multi_config’ from ‘mdb_attr_mask’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/attr.c:598:30: danger: dereference of NULL ‘mdb_attr_mask(mdb,  ad)’
#  596|   			AttrInfo *b = mdb_attr_mask( mdb, ad );
#  597|   			/* If this is just an index record, reuse it for multival info */
#  598|-> 			if ( b->ai_multi_lo == UINT_MAX ) {
#  599|   				b->ai_multi_hi = a->ai_multi_hi;
#  600|   				b->ai_multi_lo = a->ai_multi_lo;

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

Error: COMPILER_WARNING (CWE-665): [#def567]
openldap-2.6.10/openldap-2.6.10/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): [#def568]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/config.c:415: error[invalidLifetime]: Using object that points to local variable 'mask' that is out of scope.
#  413|   		ID id = 0;
#  414|   		s = 0;			/* key 0 records next entryID to index */
#  415|-> 		data.mv_size = sizeof( ID );
#  416|   		data.mv_data = &id;
#  417|   		rc = mdb_cursor_put( curs, &key, &data, 0 );

Error: COMPILER_WARNING: [#def569]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/config.c: scope_hint: In function ‘mdb_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/config.c:886:68: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 4123 bytes into a region of size 256
#  886 |                         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 ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  884|   			char ebuf[128];
#  885|   			int saved_errno = errno;
#  886|-> 			snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: invalid path: %s",
#  887|   				c->log, AC_STRERROR_R( saved_errno, ebuf, sizeof(ebuf) ) );
#  888|   			Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg );

Error: COMPILER_WARNING: [#def570]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/dn2id.c: scope_hint: In function ‘mdb_dn2id’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/servers/slapd/back-mdb/dn2id.c:306:14: note: ‘dn’ declared here
#  306 |         char dn[SLAP_LDAPDN_MAXLEN];
#      |              ^~
openldap-2.6.10/openldap-2.6.10/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): [#def571]
openldap-2.6.10/openldap-2.6.10/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): [#def572]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/dn2id.c: scope_hint: In function ‘mdb_id2name’
openldap-2.6.10/openldap-2.6.10/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): [#def573]
openldap-2.6.10/openldap-2.6.10/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): [#def574]
openldap-2.6.10/openldap-2.6.10/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): [#def575]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/filterindex.c: scope_hint: In function ‘ext_candidates’
openldap-2.6.10/openldap-2.6.10/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): [#def576]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_id2v_compare’
openldap-2.6.10/openldap-2.6.10/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): [#def577]
openldap-2.6.10/openldap-2.6.10/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): [#def578]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_id2v_dupsort’
openldap-2.6.10/openldap-2.6.10/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): [#def579]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_mval_del’
openldap-2.6.10/openldap-2.6.10/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): [#def580]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:754:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘moi’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:599:5: enter_function: entry to ‘mdb_entry_get’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:608:29: release_memory: ‘moi’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:608:29: release_memory: ‘moi’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:608:29: release_memory: ‘moi’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:620:14: call_function: calling ‘mdb_opinfo_get’ from ‘mdb_entry_get’
#  752|   			*moip = moi;
#  753|   		}
#  754|-> 		moi->moi_ref++;
#  755|   		if ( !moi->moi_txn ) {
#  756|   			if (( slapMode & SLAP_TOOL_MODE ) && mdb_tool_txn ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def581]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1059:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘a’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1035:5: enter_function: entry to ‘mdb_entry_decode’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1053:13: call_function: calling ‘mdb_entry_alloc’ from ‘mdb_entry_decode’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1053:13: return_function: returning to ‘mdb_entry_decode’ from ‘mdb_entry_alloc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1055:12: branch_false: following ‘false’ branch (when ‘nvals != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1058:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/id2entry.c:1058:9: release_memory: ‘a’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def582]
openldap-2.6.10/openldap-2.6.10/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): [#def583]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/index.c: scope_hint: In function ‘mdb_index_param’
openldap-2.6.10/openldap-2.6.10/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): [#def584]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/index.c: scope_hint: In function ‘indexer’
openldap-2.6.10/openldap-2.6.10/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): [#def585]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/modrdn.c: scope_hint: In function ‘mdb_modrdn’
openldap-2.6.10/openldap-2.6.10/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): [#def586]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/monitor.c: scope_hint: In function ‘mdb_monitor_free’
openldap-2.6.10/openldap-2.6.10/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): [#def587]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/monitor.c: scope_hint: In function ‘mdb_monitor_db_open’
openldap-2.6.10/openldap-2.6.10/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): [#def588]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/search.c: scope_hint: In function ‘mdb_search’
openldap-2.6.10/openldap-2.6.10/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): [#def589]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def590]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-mdb/tools.c:1254:1: warning[-Wunused-function]: ‘mdb_tool_index_task’ defined but not used
# 1254 | mdb_tool_index_task( void *ctx, void *ptr )
#      | ^~~~~~~~~~~~~~~~~~~
# 1252|   
# 1253|   static void *
# 1254|-> mdb_tool_index_task( void *ctx, void *ptr )
# 1255|   {
# 1256|   	int base = *(int *)ptr;

Error: COMPILER_WARNING: [#def591]
openldap-2.6.10/openldap-2.6.10/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: [#def592]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def593]
openldap-2.6.10/openldap-2.6.10/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): [#def594]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:733:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1089:1: enter_function: entry to ‘meta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def595]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:770:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1089:1: enter_function: entry to ‘meta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1940:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def596]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:779:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1089:1: enter_function: entry to ‘meta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1940:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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: [#def597]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_subtree_config’
openldap-2.6.10/openldap-2.6.10/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): [#def598]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1364:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def599]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1390:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def600]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1586:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1113:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def601]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1738:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def602]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1752:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1751:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1752:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def603]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1758:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1751:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1758:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def604]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1857:71: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def605]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1882:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1881:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1882:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def606]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1886:67: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1103:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1105:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1621:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1881:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1886:43: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def607]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2157:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1919:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1919:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: [#def608]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/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): [#def609]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def610]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2255:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2248:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2255:42: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def611]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2297:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def612]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2299:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2296:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/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): [#def613]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2305:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def614]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2307:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2304:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/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): [#def615]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2320:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2313:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2320:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def616]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2348:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2341:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2348:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def617]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2443:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2436:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2443:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def618]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2595:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def619]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2623:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2622:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2623:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def620]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2625:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2622:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2625:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def621]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2638:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mt’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1919:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1919:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def622]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2692:35: warning[-Wmaybe-uninitialized]: ‘i’ may be used uninitialized
# 2692 |                         for ( ; i < cnt; i++ ) {
#      |                                 ~~^~~~~
openldap-2.6.10/openldap-2.6.10/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): [#def623]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2871:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def624]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2882:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2875:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2882:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def625]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2888:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2887:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2888:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def626]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2890:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2887:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2890:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def627]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2897:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2896:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2897:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def628]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2899:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2896:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2899:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def629]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2906:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2905:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2906:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def630]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2909:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2905:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2908:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2908:27: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2909:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def631]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2911:71: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1097:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1099:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1112:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1620:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1918:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1938:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1942:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1943:28: branch_false: following ‘false’ branch (when ‘mt’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:1950:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2905:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2908:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2908:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2911:29: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2911:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/config.c:2911:71: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def632]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:280:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1207:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1234:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1237:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1240:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1243:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1243:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1246:37: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1246:35: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1255:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1260:50: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1260:50: 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): [#def633]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_get_candidate’
openldap-2.6.10/openldap-2.6.10/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): [#def634]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1244:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1207:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1234:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1237:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1240:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1243:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1243:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1244:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def635]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1247:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1207:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1234:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1236:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1237:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1240:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1243:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1243:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1246:37: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1246:35: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1247:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def636]
openldap-2.6.10/openldap-2.6.10/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): [#def637]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/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): [#def638]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1481:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1316:12: branch_false: following ‘false’ branch (when ‘op_type != 1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1474:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1474:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1476:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1476:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1476:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1477:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1480:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1481:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def639]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1484:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1019:1: enter_function: entry to ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1052:17: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1077:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1082:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1084:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1086:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1095:28: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1107:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1119:20: branch_false: following ‘false’ branch (when ‘mc’ is NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1316:12: branch_false: following ‘false’ branch (when ‘op_type != 1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1474:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1474:20: branch_true: following ‘true’ branch (when ‘mc’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1476:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1476:30: call_function: calling ‘metaconn_alloc’ from ‘meta_back_getconn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1476:30: return_function: returning to ‘meta_back_getconn’ from ‘metaconn_alloc’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1477:39: release_memory: ‘metaconn_alloc(op)’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1480:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1483:37: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1483:35: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/conn.c:1484:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def640]
openldap-2.6.10/openldap-2.6.10/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): [#def641]
openldap-2.6.10/openldap-2.6.10/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): [#def642]
openldap-2.6.10/openldap-2.6.10/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): [#def643]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/init.c: scope_hint: In function ‘meta_back_db_open’
openldap-2.6.10/openldap-2.6.10/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): [#def644]
openldap-2.6.10/openldap-2.6.10/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): [#def645]
openldap-2.6.10/openldap-2.6.10/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): [#def646]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-meta/search.c: scope_hint: In function ‘meta_back_search’
openldap-2.6.10/openldap-2.6.10/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: [#def647]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def648]
openldap-2.6.10/openldap-2.6.10/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: [#def649]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def650]
openldap-2.6.10/openldap-2.6.10/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): [#def651]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/cache.c: scope_hint: In function ‘monitor_cache_add’
openldap-2.6.10/openldap-2.6.10/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): [#def652]
openldap-2.6.10/openldap-2.6.10/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): [#def653]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/cache.c: scope_hint: In function ‘monitor_cache_remove’
openldap-2.6.10/openldap-2.6.10/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): [#def654]
openldap-2.6.10/openldap-2.6.10/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): [#def655]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_overlay_init_one’
openldap-2.6.10/openldap-2.6.10/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): [#def656]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_database_init_one’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c:370:37: warning[-Wmaybe-uninitialized]: ‘e_overlay’ may be used uninitialized
#  370 |                                 *ep = e_overlay;
#      |                                 ~~~~^~~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/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): [#def657]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c:656:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘be’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c:640:12: branch_false: following ‘false’ branch (when ‘i == 1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c:644:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/database.c:644:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/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): [#def658]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:808:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elpp’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:625:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:635:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:637:9: branch_true: following ‘true’ branch (when ‘mi’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:638:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:638:9: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:639:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:639:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:641:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:641:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:649:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:649:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:771:48: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:776:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:777:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c:808:22: danger: dereference of NULL ‘elpp’
#  806|   
#  807|   done_limbo:;
#  808|-> 		if ( *elpp != NULL ) {
#  809|   			el.el_next = NULL;
#  810|   			**elpp = el;

Error: COMPILER_WARNING (CWE-665): [#def659]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-monitor/init.c: scope_hint: In function ‘monitor_back_initialize’
openldap-2.6.10/openldap-2.6.10/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: [#def660]
openldap-2.6.10/openldap-2.6.10/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: [#def661]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def662]
openldap-2.6.10/openldap-2.6.10/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: [#def663]
openldap-2.6.10/openldap-2.6.10/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: [#def664]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def665]
openldap-2.6.10/openldap-2.6.10/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: [#def666]
openldap-2.6.10/openldap-2.6.10/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: [#def667]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def668]
openldap-2.6.10/openldap-2.6.10/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): [#def669]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-perl/config.c: scope_hint: At top level
openldap-2.6.10/openldap-2.6.10/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): [#def670]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-perl/config.c: scope_hint: In function ‘perl_cf’
openldap-2.6.10/openldap-2.6.10/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: [#def671]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-perl/config.c: scope_hint: In function ‘perl_cf’
openldap-2.6.10/openldap-2.6.10/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: [#def672]
openldap-2.6.10/openldap-2.6.10/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: [#def673]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def674]
openldap-2.6.10/openldap-2.6.10/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): [#def675]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-relay/op.c:149:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rs’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-relay/op.c:315:1: enter_function: entry to ‘relay_back_has_subordinates’
openldap-2.6.10/openldap-2.6.10/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): [#def676]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-relay/op.c:164:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rs’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-relay/op.c:315:1: enter_function: entry to ‘relay_back_has_subordinates’
openldap-2.6.10/openldap-2.6.10/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): [#def677]
openldap-2.6.10/openldap-2.6.10/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: [#def678]
openldap-2.6.10/openldap-2.6.10/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: [#def679]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def680]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def681]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:58:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:48:14: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:49:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:54:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:57:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:58:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:58:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:58:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:58:17: danger: ‘fd’ leaks here
#   56|   		sockpath);
#   57|   	if ( connect( fd, (struct sockaddr *)&sockun, sizeof(sockun) ) < 0 ) {
#   58|-> 		Debug( LDAP_DEBUG_ANY, "socket connect(%s) failed\n",
#   59|   			sockpath ? sockpath : "<null>" );
#   60|   		close( fd );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def682]
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:60:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:48:14: acquire_resource: stream socket created here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:49:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:54:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:57:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:58:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/back-sock/opensock.c:60:17: danger: ‘fd’ leaks here
#   58|   		Debug( LDAP_DEBUG_ANY, "socket connect(%s) failed\n",
#   59|   			sockpath ? sockpath : "<null>" );
#   60|-> 		close( fd );
#   61|   		return( NULL );
#   62|   	}

Error: COMPILER_WARNING: [#def683]
openldap-2.6.10/openldap-2.6.10/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: [#def684]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def685]
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:81:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘on’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1209:1: enter_function: entry to ‘glue_tool_entry_put’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1219:37: call_function: calling ‘glue_tool_inst’ from ‘glue_tool_entry_put’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1219:37: return_function: returning to ‘glue_tool_entry_put’ from ‘glue_tool_inst’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1219:9: release_memory: ‘b2.bd_info’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def686]
openldap-2.6.10/openldap-2.6.10/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): [#def687]
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:861:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:841:1: enter_function: entry to ‘glue_open’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:845:29: call_function: calling ‘glue_tool_inst’ from ‘glue_open’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:845:29: return_function: returning to ‘glue_open’ from ‘glue_tool_inst’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:853:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:856:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:857:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:860:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def688]
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:883:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:841:1: enter_function: entry to ‘glue_open’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:845:29: call_function: calling ‘glue_tool_inst’ from ‘glue_open’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:845:29: return_function: returning to ‘glue_open’ from ‘glue_tool_inst’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:853:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:856:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:857:29: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:883:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:883:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:883:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def689]
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1292:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1279:1: enter_function: entry to ‘glue_tool_sync’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1283:31: call_function: calling ‘glue_tool_inst’ from ‘glue_tool_sync’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backglue.c:1283:31: return_function: returning to ‘glue_tool_sync’ from ‘glue_tool_inst’
openldap-2.6.10/openldap-2.6.10/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): [#def690]
openldap-2.6.10/openldap-2.6.10/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): [#def691]
openldap-2.6.10/openldap-2.6.10/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): [#def692]
openldap-2.6.10/openldap-2.6.10/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): [#def693]
openldap-2.6.10/openldap-2.6.10/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): [#def694]
openldap-2.6.10/openldap-2.6.10/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): [#def695]
openldap-2.6.10/openldap-2.6.10/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): [#def696]
openldap-2.6.10/openldap-2.6.10/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: COMPILER_WARNING (CWE-457): [#def697]
openldap-2.6.10/openldap-2.6.10/servers/slapd/backover.c: scope_hint: In function ‘over_op_func’
openldap-2.6.10/openldap-2.6.10/servers/slapd/backover.c:769:28: warning[-Wmaybe-uninitialized]: ‘cb’ may be used uninitialized
#  769 |                         if ( *sc == cb ) {
#      |                            ^
openldap-2.6.10/openldap-2.6.10/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): [#def698]
openldap-2.6.10/openldap-2.6.10/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): [#def699]
openldap-2.6.10/openldap-2.6.10/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): [#def700]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:1699: warning[uninitvar]: Uninitialized variable: *prev
# 1697|   					prev = &a->acl_next;
# 1698|   				}
# 1699|-> 				a = *prev;
# 1700|   				*prev = a->acl_next;
# 1701|   				acl_free( a );

Error: CPPCHECK_WARNING (CWE-457): [#def701]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:2275: warning[uninitvar]: Uninitialized variable: sv
# 2273|   				svtail = sv;
# 2274|   			}
# 2275|-> 			sv->al_next = NULL;
# 2276|   			for ( sv = svnew; sv; sv = sv->al_next )
# 2277|   				sv->al_desc->ad_type->sat_flags |= SLAP_AT_SORTED_VAL;

Error: COMPILER_WARNING (CWE-457): [#def702]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c: scope_hint: In function ‘config_generic’
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:2275:37: warning[-Wmaybe-uninitialized]: ‘svtail’ may be used uninitialized
# 2275 |                         sv->al_next = NULL;
#      |                                     ^
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:2240:48: note: ‘svtail’ was declared here
# 2240 |                         ADlist *svnew = NULL, *svtail, *sv;
#      |                                                ^~~~~~
# 2273|   				svtail = sv;
# 2274|   			}
# 2275|-> 			sv->al_next = NULL;
# 2276|   			for ( sv = svnew; sv; sv = sv->al_next )
# 2277|   				sv->al_desc->ad_type->sat_flags |= SLAP_AT_SORTED_VAL;

Error: CPPCHECK_WARNING (CWE-562): [#def703]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6488: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6486|   		slap_unpause_server();
# 6487|   out:
# 6488|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6489|   	send_ldap_result( op, rs );
# 6490|   	slap_graduate_commit_csn( op );

Error: COMPILER_WARNING (CWE-457): [#def704]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6704:29: warning[-Wmaybe-uninitialized]: ‘ixnew’ may be used uninitialized
# 6704 |                 for ( i=0; i<ixnew; i++ ) {
#      |                            ~^~~~~~
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6500:20: note: ‘ixnew’ was declared here
# 6500 |         int ixold, ixnew, dopause = 1;
#      |                    ^~~~~
# 6702|   		/* Insert into new slot */
# 6703|   		cprev = cbprev;
# 6704|-> 		for ( i=0; i<ixnew; i++ ) {
# 6705|   			ce2 = *cprev;
# 6706|   			if ( !ce2 )

Error: COMPILER_WARNING (CWE-457): [#def705]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c: scope_hint: In function ‘config_back_modrdn’
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6723:20: warning[-Wmaybe-uninitialized]: ‘ixold’ may be used uninitialized
# 6723 |                 if ( ixold < ixnew ) {
#      |                    ^
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6500:13: note: ‘ixold’ was declared here
# 6500 |         int ixold, ixnew, dopause = 1;
#      |             ^~~~~
# 6721|   		op->o_preread = preread;
# 6722|   		op->o_postread = postread;
# 6723|-> 		if ( ixold < ixnew ) {
# 6724|   			rs->sr_err = config_rename_del( op, rs, ce, ceold, ixold,
# 6725|   				cfb->cb_use_ldif );

Error: CPPCHECK_WARNING (CWE-562): [#def706]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6754: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6752|   		slap_unpause_server();
# 6753|   out:
# 6754|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6755|   	send_ldap_result( op, rs );
# 6756|   	return rs->sr_err;

Error: CPPCHECK_WARNING (CWE-562): [#def707]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:6941: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6939|   	}
# 6940|   out:
# 6941|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6942|   #else
# 6943|   	rs->sr_err = LDAP_UNWILLING_TO_PERFORM;

Error: CPPCHECK_WARNING (CWE-457): [#def708]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bconfig.c:7656: warning[uninitvar]: Uninitialized variables: vl.vl_next, vl.vl_ptr
# 7654|   				vl->vl_ptr = on;
# 7655|   			}
# 7656|-> 			for (j=0; vl; j++,vl=v0) {
# 7657|   				on = vl->vl_ptr;
# 7658|   				v0 = vl->vl_next;

Error: COMPILER_WARNING (CWE-1164): [#def709]
openldap-2.6.10/openldap-2.6.10/servers/slapd/bind.c: scope_hint: In function ‘fe_op_lastbind’
openldap-2.6.10/openldap-2.6.10/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): [#def710]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c: scope_hint: In function ‘config_find_keyword’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/portable.h:1189: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:27: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/include/lutil.h:55:9: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#   55 |         unsigned char *,
#      |         ^~~~~~~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def711]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:823:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:827:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:839:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:862:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  872|   	}
#  873|   
#  874|-> 	Debug(LDAP_DEBUG_CONFIG, "reading config file %s\n", fname );
#  875|   
#  876|   	fp_getline_init(c);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:823:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:827:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:839:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:862:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  872|   	}
#  873|   
#  874|-> 	Debug(LDAP_DEBUG_CONFIG, "reading config file %s\n", fname );
#  875|   
#  876|   	fp_getline_init(c);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def713]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:2120:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:814:1: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:823:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:827:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:839:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:862:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:880:17: call_function: calling ‘fp_getline’ from ‘read_config_file’
# 2118|   
# 2119|   	lcur = 0;
# 2120|-> 	CATLINE(buf);
# 2121|   	c->lineno++;
# 2122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:2120:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:814:1: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:823:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:827:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:839:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:862:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:880:17: call_function: calling ‘fp_getline’ from ‘read_config_file’
# 2118|   
# 2119|   	lcur = 0;
# 2120|-> 	CATLINE(buf);
# 2121|   	c->lineno++;
# 2122|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def715]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:2153:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:814:1: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:823:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:827:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:839:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:862:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:880:17: call_function: calling ‘fp_getline’ from ‘read_config_file’
# 2151|   			buf[0] = ' ';
# 2152|   		}
# 2153|-> 		CATLINE(buf);
# 2154|   		c->lineno++;
# 2155|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:2153:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:814:1: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:823:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:827:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:839:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:851:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:861:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:862:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:874:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/config.c:880:17: call_function: calling ‘fp_getline’ from ‘read_config_file’
# 2151|   			buf[0] = ' ';
# 2152|   		}
# 2153|-> 		CATLINE(buf);
# 2154|   		c->lineno++;
# 2155|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def717]
openldap-2.6.10/openldap-2.6.10/servers/slapd/connection.c:1230:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/connection.c:1221:6: enter_function: entry to ‘connection_client_stop’
openldap-2.6.10/openldap-2.6.10/servers/slapd/connection.c:1228:13: call_function: calling ‘connection_get’ from ‘connection_client_stop’
openldap-2.6.10/openldap-2.6.10/servers/slapd/connection.c:1228:13: return_function: returning to ‘connection_client_stop’ from ‘connection_get’
openldap-2.6.10/openldap-2.6.10/servers/slapd/connection.c:1230:9: danger: dereference of NULL ‘connection_get(s)’
# 1228|   	c = connection_get( s );
# 1229|   
# 1230|-> 	assert( c->c_conn_state == SLAP_C_CLIENT );
# 1231|   
# 1232|   	c->c_listener = NULL;

Error: COMPILER_WARNING (CWE-563): [#def718]
openldap-2.6.10/openldap-2.6.10/servers/slapd/controls.c: scope_hint: In function ‘register_control_exop’
openldap-2.6.10/openldap-2.6.10/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): [#def719]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c: scope_hint: In function ‘slapd_remove’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def720]
openldap-2.6.10/openldap-2.6.10/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): [#def721]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1391:22: warning[-Wanalyzer-null-argument]: use of NULL ‘host’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1505:1: enter_function: entry to ‘slap_open_listener’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1530:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1537:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1554:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1559:56: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1569:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1584:24: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def722]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1667:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1505:1: enter_function: entry to ‘slap_open_listener’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1530:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1537:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1569:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1571:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1572:31: call_function: calling ‘slap_get_listener_addresses’ from ‘slap_open_listener’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1572:31: return_function: returning to ‘slap_open_listener’ from ‘slap_get_listener_addresses’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1614:12: branch_false: following ‘false’ branch (when ‘err == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1630:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1632:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1655:21: acquire_resource: socket created here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1656:20: branch_false: following ‘false’ branch (when ‘s != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1664:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1666:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1667:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1667:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1667:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:1667:25: danger: ‘s’ leaks here
# 1665|   
# 1666|   		if ( l.sl_sd >= dtblsize ) {
# 1667|-> 			Debug( LDAP_DEBUG_ANY,
# 1668|   				"daemon: listener descriptor %ld is too great %ld\n",
# 1669|   				(long) l.sl_sd, (long) dtblsize );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def723]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2183:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def724]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2144:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2144:9: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2142|   	 */
# 2143|   	sl->sl_busy = 0;
# 2144|-> 	WAKE_LISTENER(DAEMON_ID(sl->sl_sd),1);
# 2145|   
# 2146|   	if ( s == AC_SOCKET_INVALID ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def725]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2175:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2175:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2175:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2175:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2175:17: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2173|   	/* make sure descriptor number isn't too great */
# 2174|   	if ( sfd >= dtblsize ) {
# 2175|-> 		Debug( LDAP_DEBUG_ANY,
# 2176|   			"daemon: %ld beyond descriptor table size %ld\n",
# 2177|   			(long) sfd, (long) dtblsize );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def726]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2186:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2183:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2186:9: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2184|   
# 2185|   #ifdef LDAP_DEBUG
# 2186|-> 	ldap_pvt_thread_mutex_lock( &slap_daemon[tid].sd_mutex );
# 2187|   	/* newly accepted stream should not be in any of the FD SETS */
# 2188|   	assert( SLAP_SOCK_NOT_ACTIVE( tid, sfd ));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def727]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2189:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2183:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2188:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2189:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2189:9: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2187|   	/* newly accepted stream should not be in any of the FD SETS */
# 2188|   	assert( SLAP_SOCK_NOT_ACTIVE( tid, sfd ));
# 2189|-> 	ldap_pvt_thread_mutex_unlock( &slap_daemon[tid].sd_mutex );
# 2190|   #endif /* LDAP_DEBUG */
# 2191|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def728]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2183:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2188:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2189:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2195:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2229|   #endif /* SO_KEEPALIVE || TCP_NODELAY */
# 2230|   
# 2231|-> 	Debug( LDAP_DEBUG_CONNS,
# 2232|   		"daemon: listen=%ld, new connection on %ld\n",
# 2233|   		(long) sl->sl_sd, (long) sfd );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def729]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2259:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2124:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2130:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2137:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2146:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2174:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2183:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2188:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2189:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2195:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2231:9: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2243:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2244:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:2259:29: danger: ‘accept(*sl.sl_sd, & from, & len)’ leaks here
# 2257|   			peerbv.bv_len = sizeof( peerbuf );
# 2258|   #endif
# 2259|-> 			if( LUTIL_GETPEEREID( s, &uid, &gid, &peerbv ) == 0 ) {
# 2260|   				authid.bv_val = ch_malloc(
# 2261|   					STRLENOF( "gidNumber=4294967295+uidNumber=4294967295,"

Error: COMPILER_WARNING (CWE-563): [#def730]
openldap-2.6.10/openldap-2.6.10/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): [#def731]
openldap-2.6.10/openldap-2.6.10/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): [#def732]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c: scope_hint: In function ‘slapd_daemon_task’
openldap-2.6.10/openldap-2.6.10/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): [#def733]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3558:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3558:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3559:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def734]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3559:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3558:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3559:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3558:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3559:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def735]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3569:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3569:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3570:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def736]
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3570:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3569:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3570:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3569:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/daemon.c:3570:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def737]
openldap-2.6.10/openldap-2.6.10/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): [#def738]
openldap-2.6.10/openldap-2.6.10/servers/slapd/entry.c: scope_hint: In function ‘entry_decode’
openldap-2.6.10/openldap-2.6.10/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): [#def739]
openldap-2.6.10/openldap-2.6.10/servers/slapd/extended.c: scope_hint: In function ‘fe_extended’
openldap-2.6.10/openldap-2.6.10/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): [#def740]
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c: scope_hint: In function ‘slap_debug_print’
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:159:57: warning[-Wunused-value]: value computed is not used
#  159 |                                                         !write( 2, buf, len );
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~
#  157|   							rc, AC_STRERROR_R( rc, ebuf, sizeof(ebuf) ));
#  158|   						if ( !logfile_only )
#  159|-> 							!write( 2, buf, len );
#  160|   						!write( logfile_fd, buf, len );
#  161|   						logfile_rotfail = 1;

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

Error: COMPILER_WARNING (CWE-563): [#def742]
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:177:57: warning[-Wunused-value]: value computed is not used
#  177 |                                                         !write( 2, buf, len );
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~
#  175|   							rc, AC_STRERROR_R( rc, ebuf, sizeof(ebuf) ));
#  176|   						if ( !logfile_only )
#  177|-> 							!write( 2, buf, len );
#  178|   						!write( logfile_fd, buf, len );
#  179|   						logfile_openfail = 1;

Error: COMPILER_WARNING (CWE-563): [#def743]
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:178:49: warning[-Wunused-value]: value computed is not used
#  178 |                                                 !write( logfile_fd, buf, len );
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  176|   						if ( !logfile_only )
#  177|   							!write( 2, buf, len );
#  178|-> 						!write( logfile_fd, buf, len );
#  179|   						logfile_openfail = 1;
#  180|   					}

Error: GCC_ANALYZER_WARNING: [#def744]
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:282:17: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘strcpy’
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:88:1: enter_function: entry to ‘slap_debug_print’
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:141:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:142:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:148:28: branch_true: following ‘true’ branch (when ‘rotate != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:150:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/logging.c:169:44: call_function: calling ‘logfile_open’ from ‘slap_debug_print’
#  280|   			goto fail;
#  281|   		}
#  282|-> 		strcpy( logfile_path, path );
#  283|   		strcpy( logpaths[0], path );
#  284|   		strcpy( logpaths[1], path );

Error: COMPILER_WARNING (CWE-252): [#def745]
openldap-2.6.10/openldap-2.6.10/servers/slapd/main.c: scope_hint: In function ‘main’
openldap-2.6.10/openldap-2.6.10/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): [#def746]
openldap-2.6.10/openldap-2.6.10/servers/slapd/modify.c: scope_hint: In function ‘slap_mods_opattrs’
openldap-2.6.10/openldap-2.6.10/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): [#def747]
openldap-2.6.10/openldap-2.6.10/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): [#def748]
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:513:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:449:9: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:452:14: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:454:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:465:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:465:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:477:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:480:26: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:512:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:512:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:513:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/modrdn.c:513:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/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): [#def749]
openldap-2.6.10/openldap-2.6.10/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): [#def750]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_purge’
openldap-2.6.10/openldap-2.6.10/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): [#def751]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_response’
openldap-2.6.10/openldap-2.6.10/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): [#def752]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_op_mod’
openldap-2.6.10/openldap-2.6.10/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): [#def753]
openldap-2.6.10/openldap-2.6.10/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): [#def754]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_db_root’
openldap-2.6.10/openldap-2.6.10/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): [#def755]
openldap-2.6.10/openldap-2.6.10/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): [#def756]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘check_rdntime_syntax’
openldap-2.6.10/openldap-2.6.10/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): [#def757]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def758]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:63:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ad.ad_logfile, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:70:12: enter_function: entry to ‘auditlog_response’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:81:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:89:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:120:12: branch_true: following ‘true’ branch (when ‘who’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:121:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:17: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:130:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:144:45: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:21: branch_true: following ‘true’ branch (when ‘b’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:146:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: call_function: calling ‘fprint_ldif’ from ‘auditlog_response’
#   61|   static int fprint_ldif(FILE *f, char *name, char *val, ber_len_t len) {
#   62|   	char *s;
#   63|-> 	if((s = ldif_put(LDIF_PUT_VALUE, name, val, len)) == NULL)
#   64|   		return(-1);
#   65|   	fputs(s, f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def759]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:63:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ad.ad_logfile, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:70:12: enter_function: entry to ‘auditlog_response’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:81:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:89:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:120:12: branch_true: following ‘true’ branch (when ‘who’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:121:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:17: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:130:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:144:45: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:21: branch_true: following ‘true’ branch (when ‘b’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:146:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: call_function: calling ‘fprint_ldif’ from ‘auditlog_response’
#   61|   static int fprint_ldif(FILE *f, char *name, char *val, ber_len_t len) {
#   62|   	char *s;
#   63|-> 	if((s = ldif_put(LDIF_PUT_VALUE, name, val, len)) == NULL)
#   64|   		return(-1);
#   65|   	fputs(s, f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def760]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:66:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ad.ad_logfile, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:70:12: enter_function: entry to ‘auditlog_response’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:81:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:89:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:120:12: branch_true: following ‘true’ branch (when ‘who’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:121:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:17: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:130:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:144:45: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:21: branch_true: following ‘true’ branch (when ‘b’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:146:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: call_function: calling ‘fprint_ldif’ from ‘auditlog_response’
#   64|   		return(-1);
#   65|   	fputs(s, f);
#   66|-> 	ber_memfree(s);
#   67|   	return(0);
#   68|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def761]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:66:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ad.ad_logfile, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:70:12: enter_function: entry to ‘auditlog_response’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:81:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:83:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:89:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:120:12: branch_true: following ‘true’ branch (when ‘who’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:121:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:17: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:125:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:130:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:144:45: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:145:21: branch_true: following ‘true’ branch (when ‘b’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:146:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/auditlog.c:147:33: call_function: calling ‘fprint_ldif’ from ‘auditlog_response’
#   64|   		return(-1);
#   65|   	fputs(s, f);
#   66|-> 	ber_memfree(s);
#   67|   	return(0);
#   68|   }

Error: COMPILER_WARNING: [#def762]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def763]
openldap-2.6.10/openldap-2.6.10/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: [#def764]
openldap-2.6.10/openldap-2.6.10/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: [#def765]
openldap-2.6.10/openldap-2.6.10/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): [#def766]
openldap-2.6.10/openldap-2.6.10/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): [#def767]
openldap-2.6.10/openldap-2.6.10/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): [#def768]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/autoca.c:729:35: warning[-Wmissing-braces]: missing braces around initializer
#  729 | static ConfigTable autoca_cfg[] = {
#      |                                   ^
#  727|   }
#  728|   
#  729|-> static ConfigTable autoca_cfg[] = {
#  730|   	{ "userClass", "objectclass", 2, 2, 0,
#  731|   	  ARG_STRING|ARG_MAGIC|ACA_USRCLASS, autoca_cf,

Error: COMPILER_WARNING (CWE-665): [#def769]
openldap-2.6.10/openldap-2.6.10/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): [#def770]
openldap-2.6.10/openldap-2.6.10/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): [#def771]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/collect.c: scope_hint: In function ‘collect_response’
openldap-2.6.10/openldap-2.6.10/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): [#def772]
openldap-2.6.10/openldap-2.6.10/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: [#def773]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_cf_gen’
openldap-2.6.10/openldap-2.6.10/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): [#def774]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_cf_gen’
openldap-2.6.10/openldap-2.6.10/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): [#def775]
openldap-2.6.10/openldap-2.6.10/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): [#def776]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_check_count_violation’
openldap-2.6.10/openldap-2.6.10/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): [#def777]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_update’
openldap-2.6.10/openldap-2.6.10/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): [#def778]
openldap-2.6.10/openldap-2.6.10/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): [#def779]
openldap-2.6.10/openldap-2.6.10/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): [#def780]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c:85:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ap’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c:72:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c:81:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c:82:35: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c:85:32: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def781]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c: scope_hint: In function ‘dgroup_cf’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dyngroup.c:85:34: warning[-Wmaybe-uninitialized]: ‘ap’ may be used uninitialized
#   85 |                         *app = ap->ap_next;
#      |                                ~~^~~~~~~~~
openldap-2.6.10/openldap-2.6.10/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): [#def782]
openldap-2.6.10/openldap-2.6.10/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): [#def783]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_filter_dup’
openldap-2.6.10/openldap-2.6.10/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): [#def784]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1957:60: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘opattrs’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1884:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1887:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1896:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1902:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1902:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1908:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1908:35: branch_true: following ‘true’ branch (when ‘dli’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1913:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1913:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1925:51: branch_true: following ‘true’ branch (when ‘dlm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1926:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1926:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1930:46: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1945:44: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1952:54: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1952:52: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1957:60: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def785]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_search’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1957:60: warning[-Wmaybe-uninitialized]: ‘opattrs’ may be used uninitialized
# 1957 |                                                         if ( opattrs ) {
#      |                                                            ^
openldap-2.6.10/openldap-2.6.10/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): [#def786]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/dynlist.c:1964:60: warning[-Wmaybe-uninitialized]: ‘userattrs’ may be used uninitialized
# 1964 |                                                         if ( userattrs ) {
#      |                                                            ^
openldap-2.6.10/openldap-2.6.10/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): [#def787]
openldap-2.6.10/openldap-2.6.10/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): [#def788]
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def789]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:601:27: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir_path)’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1185:1: enter_function: entry to ‘chown_tree’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1197:9: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1199:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1212:14: call_function: calling ‘traverse’ from ‘chown_tree’
#  599|   	}
#  600|   
#  601|-> 	while ( ( entry = readdir( dir ) ) != NULL ) {
#  602|   		/* no d_namelen in ac/dirent.h */
#  603|   		int d_namelen = strlen( entry->d_name );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def790]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:681:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘tp.file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1459:1: enter_function: entry to ‘tar_tree’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1465:9: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: following ‘true’ branch (when ‘tar_name’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1468:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1478:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1479:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: call_function: calling ‘traverse’ from ‘tar_tree’
#  679|   	assert( cb->pre_func || cb->post_func );
#  680|   
#  681|-> 	Debug( LDAP_DEBUG_TRACE, "homedir: "
#  682|   			"traverse: %s\n", path );
#  683|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def791]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:681:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tp.file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1459:1: enter_function: entry to ‘tar_tree’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1465:9: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: following ‘true’ branch (when ‘tar_name’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1468:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1478:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1479:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: call_function: calling ‘traverse’ from ‘tar_tree’
#  679|   	assert( cb->pre_func || cb->post_func );
#  680|   
#  681|-> 	Debug( LDAP_DEBUG_TRACE, "homedir: "
#  682|   			"traverse: %s\n", path );
#  683|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def792]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:684:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘tp.file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1459:1: enter_function: entry to ‘tar_tree’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1465:9: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: following ‘true’ branch (when ‘tar_name’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1468:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1478:19: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1479:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: call_function: calling ‘traverse’ from ‘tar_tree’
#  682|   			"traverse: %s\n", path );
#  683|   
#  684|-> 	dir_stack = ber_memcalloc_x( 1, sizeof(*dir_stack), ctx );
#  685|   	if ( dir_stack == NULL ) goto alloc_fail;
#  686|   	dir_stack->next = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def793]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:684:21: warning[-Wanalyzer-malloc-leak]: leak of ‘tp.file’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1459:1: enter_function: entry to ‘tar_tree’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1465:9: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1466:9: branch_true: following ‘true’ branch (when ‘tar_name’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1468:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1478:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1479:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c:1484:14: call_function: calling ‘traverse’ from ‘tar_tree’
#  682|   			"traverse: %s\n", path );
#  683|   
#  684|-> 	dir_stack = ber_memcalloc_x( 1, sizeof(*dir_stack), ctx );
#  685|   	if ( dir_stack == NULL ) goto alloc_fail;
#  686|   	dir_stack->next = NULL;

Error: COMPILER_WARNING: [#def794]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c: scope_hint: In function ‘traverse_tar_pre’
openldap-2.6.10/openldap-2.6.10/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: [#def795]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: [#def796]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c: scope_hint: In function ‘traverse_tar_pre’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def797]
openldap-2.6.10/openldap-2.6.10/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): [#def798]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/homedir.c: scope_hint: In function ‘homedir_mod_response’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def799]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/memberof.c:1751:31: warning[-Wmissing-braces]: missing braces around initializer
# 1751 | static ConfigTable mo_cfg[] = {
#      |                               ^
# 1749|   
# 1750|   
# 1751|-> static ConfigTable mo_cfg[] = {
# 1752|   	{ "memberof-dn", "modifiersName",
# 1753|   		2, 2, 0, ARG_MAGIC|ARG_QUOTE|ARG_DN|MO_DN, mo_cf_gen,

Error: COMPILER_WARNING (CWE-685): [#def800]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/memberof.c: scope_hint: In function ‘mo_cf_gen’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/memberof.c:2156:49: warning[-Wformat-extra-args]: too many arguments for format
# 2156 |                                                 "addcheck functionality not supported "
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2154|   				if ( SLAP_ISGLOBALOVERLAY( c->be ) ) {
# 2155|   					snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2156|-> 						"addcheck functionality not supported "
# 2157|   						"when memberof is a global overlay",
# 2158|   						c->argv[ 1 ] );

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

Error: COMPILER_WARNING (CWE-665): [#def802]
openldap-2.6.10/openldap-2.6.10/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): [#def803]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/nestgroup.c: scope_hint: In function ‘nestgroup_memberFilter’
openldap-2.6.10/openldap-2.6.10/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): [#def804]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/nestgroup.c: scope_hint: In function ‘nestgroup_memberOfFilter’
openldap-2.6.10/openldap-2.6.10/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): [#def805]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/servers/slapd/overlays/pcache.c: scope_hint: In function ‘pcache_db_open2’
openldap-2.6.10/openldap-2.6.10/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: COMPILER_WARNING (CWE-457): [#def806]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:812:42: warning[-Wmaybe-uninitialized]: ‘refresh_time’ may be used uninitialized
#  812 |                         cq->refresh_time = refresh_time;
#      |                         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c: scope_hint: In function ‘pcache_db_open2’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:611:25: note: ‘refresh_time’ was declared here
#  611 |         time_t          refresh_time;
#      |                         ^~~~~~~~~~~~
#  810|   		if ( cq != NULL ) {
#  811|   			cq->expiry_time = expiry_time;
#  812|-> 			cq->refresh_time = refresh_time;
#  813|   			cq->q_uuid = uuid;
#  814|   			cq->answerable_cnt = answerable_cnt;

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

Error: CPPCHECK_WARNING (CWE-562): [#def808]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:1820: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1818|   	op->o_tag = LDAP_REQ_SEARCH;
# 1819|   	op->o_protocol = LDAP_VERSION3;
# 1820|-> 	op->o_callback = &cb;
# 1821|   	op->o_time = slap_get_time();
# 1822|   	op->o_do_not_cache = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def809]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:2146: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2144|   	op->o_ndn = op->o_bd->be_rootndn;
# 2145|   	sc.sc_response = fetch_queryId_cb;
# 2146|-> 	op->o_callback = &sc;
# 2147|   
# 2148|   	for ( s = 0; !BER_BVISNULL( &entryUUIDs[ s ] ); s++ ) {

Error: CPPCHECK_WARNING (CWE-562): [#def810]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:2275: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2273|   	op->o_ndn = op->o_bd->be_rootndn;
# 2274|   	sc.sc_response = fetch_queryId_cb;
# 2275|-> 	op->o_callback = &sc;
# 2276|   
# 2277|   	rc = op->o_bd->be_search( op, &rs );

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

Error: CPPCHECK_WARNING (CWE-562): [#def812]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:3430: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3428|   	op->o_tag = LDAP_REQ_SEARCH;
# 3429|   	op->o_protocol = LDAP_VERSION3;
# 3430|-> 	op->o_callback = &cb;
# 3431|   	op->o_do_not_cache = 1;
# 3432|   

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

Error: COMPILER_WARNING (CWE-665): [#def814]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/pcache.c:3691:30: warning[-Wmissing-braces]: missing braces around initializer
# 3691 | static ConfigTable pccfg[] = {
#      |                              ^
# 3689|   static ConfigCfAdd pc_cfadd;
# 3690|   
# 3691|-> static ConfigTable pccfg[] = {
# 3692|   	{ "pcache", "backend> <max_entries> <numattrsets> <entry limit> "
# 3693|   				"<cycle_time",

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

Error: COMPILER_WARNING (CWE-665): [#def816]
openldap-2.6.10/openldap-2.6.10/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): [#def817]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1168:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bd’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1932:1: enter_function: entry to ‘ppolicy_bind’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1943:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1949:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1952:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1956:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def818]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_get’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c:1168:26: warning[-Wmaybe-uninitialized]: ‘bd’ may be used uninitialized
# 1168 |                 op->o_bd = bd;
#      |                 ~~~~~~~~~^~~~
openldap-2.6.10/openldap-2.6.10/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): [#def819]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘check_password_quality’
openldap-2.6.10/openldap-2.6.10/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: [#def820]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_bind_response’
openldap-2.6.10/openldap-2.6.10/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): [#def821]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_account_usability_entry_cb’
openldap-2.6.10/openldap-2.6.10/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): [#def822]
openldap-2.6.10/openldap-2.6.10/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): [#def823]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/refint.c: scope_hint: In function ‘refint_search_cb’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/include/portable.h:1189: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/refint.c:22: included_from: Included from here.
openldap-2.6.10/openldap-2.6.10/servers/slapd/proto-slap.h:282:19: note: expected ‘unsigned int *’ but argument is of type ‘int *’
#  282 |         unsigned *slot,
#      |         ~~~~~~~~~~^~~~
openldap-2.6.10/openldap-2.6.10/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): [#def824]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/refint.c: scope_hint: In function ‘refint_response’
openldap-2.6.10/openldap-2.6.10/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): [#def825]
openldap-2.6.10/openldap-2.6.10/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): [#def826]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:291:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘map’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:272:44: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:285:55: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:286:65: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:290:52: branch_true: following ‘true’ branch (when ‘pmap’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:291:70: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def827]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(realm, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:496:12: branch_false: following ‘false’ branch (when ‘realm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: following ‘false’ branch (when ‘isfile != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:509:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_false: following ‘false’ branch (when ‘ldap_url’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:51: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:550:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:553:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:526:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_true: following ‘true’ branch (when ‘ldap_url’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:30: danger: ‘fopen(realm, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  536|   			char *nu;
#  537|   
#  538|-> 			nu = ch_malloc( strlen( ldap_url ) + 2 + strlen( LDAP_PREFIX ) +
#  539|   					strlen( line ) );
#  540|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def828]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(realm, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:496:12: branch_false: following ‘false’ branch (when ‘realm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: following ‘false’ branch (when ‘isfile != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:509:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_false: following ‘false’ branch (when ‘ldap_url’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:51: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:550:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:553:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:526:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_true: following ‘true’ branch (when ‘ldap_url’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:30: danger: ‘fopen(realm, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  536|   			char *nu;
#  537|   
#  538|-> 			nu = ch_malloc( strlen( ldap_url ) + 2 + strlen( LDAP_PREFIX ) +
#  539|   					strlen( line ) );
#  540|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def829]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:546:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(realm, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:496:12: branch_false: following ‘false’ branch (when ‘realm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: following ‘false’ branch (when ‘isfile != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:509:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_false: following ‘false’ branch (when ‘ldap_url’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:51: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:550:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:553:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:526:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_true: following ‘true’ branch (when ‘ldap_url’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:541:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:544:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:546:25: danger: ‘fopen(realm, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  544|   				sprintf( nu, "%s %s%s", ldap_url, LDAP_PREFIX, line );
#  545|   			}
#  546|-> 			ch_free( ldap_url );
#  547|   			ldap_url = nu;
#  548|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def830]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:546:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(realm, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:496:12: branch_false: following ‘false’ branch (when ‘realm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: following ‘false’ branch (when ‘isfile != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:509:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_false: following ‘false’ branch (when ‘ldap_url’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:51: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:550:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:553:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:526:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_true: following ‘true’ branch (when ‘ldap_url’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:538:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:541:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:544:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:546:25: danger: ‘fopen(realm, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  544|   				sprintf( nu, "%s %s%s", ldap_url, LDAP_PREFIX, line );
#  545|   			}
#  546|-> 			ch_free( ldap_url );
#  547|   			ldap_url = nu;
#  548|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def831]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:36: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(realm, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:496:12: branch_false: following ‘false’ branch (when ‘realm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: following ‘false’ branch (when ‘isfile != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:509:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_false: following ‘false’ branch (when ‘ldap_url’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:51: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:36: danger: ‘fopen(realm, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  547|   			ldap_url = nu;
#  548|   		} else {
#  549|-> 			ldap_url = ch_malloc( 1 + strlen( line ) + strlen( LDAP_PREFIX ) );
#  550|   			if ( strstr( line, "://" ) ) {
#  551|   				strcpy( ldap_url, line );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def832]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:36: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(realm, "r")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:496:12: branch_false: following ‘false’ branch (when ‘realm’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:498:12: branch_false: following ‘false’ branch (when ‘isfile != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:508:14: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:509:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:522:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:525:21: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:535:20: branch_false: following ‘false’ branch (when ‘ldap_url’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:51: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/remoteauth.c:549:36: danger: ‘fopen(realm, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  547|   			ldap_url = nu;
#  548|   		} else {
#  549|-> 			ldap_url = ch_malloc( 1 + strlen( line ) + strlen( LDAP_PREFIX ) );
#  550|   			if ( strstr( line, "://" ) ) {
#  551|   				strcpy( ldap_url, line );

Error: COMPILER_WARNING (CWE-665): [#def833]
openldap-2.6.10/openldap-2.6.10/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): [#def834]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/rwm.c: scope_hint: In function ‘rwm_op_add’
openldap-2.6.10/openldap-2.6.10/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): [#def835]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/rwm.c: scope_hint: At top level
openldap-2.6.10/openldap-2.6.10/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): [#def836]
openldap-2.6.10/openldap-2.6.10/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): [#def837]
openldap-2.6.10/openldap-2.6.10/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): [#def838]
openldap-2.6.10/openldap-2.6.10/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): [#def839]
openldap-2.6.10/openldap-2.6.10/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): [#def840]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findbase’
openldap-2.6.10/openldap-2.6.10/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): [#def841]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.10/openldap-2.6.10/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): [#def842]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:734:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maxid’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:728:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:734:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def843]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def844]
openldap-2.6.10/openldap-2.6.10/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): [#def845]
openldap-2.6.10/openldap-2.6.10/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): [#def846]
openldap-2.6.10/openldap-2.6.10/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): [#def847]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_play_sessionlog’
openldap-2.6.10/openldap-2.6.10/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): [#def848]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.10/openldap-2.6.10/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): [#def849]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_response’
openldap-2.6.10/openldap-2.6.10/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): [#def850]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.10/openldap-2.6.10/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): [#def851]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3357:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maxcsn.bv_val’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3143:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3145:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3145:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3150:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3158:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3235:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3237:12: branch_true: following ‘true’ branch (when ‘numcsns != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3238:60: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3250:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3256:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3256:20: branch_false: following ‘false’ branch (when ‘numcsns != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3262:23: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3287:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3307:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3309:32: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3356:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3356:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c:3357:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def852]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/syncprov.c: scope_hint: At top level
openldap-2.6.10/openldap-2.6.10/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): [#def853]
openldap-2.6.10/openldap-2.6.10/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): [#def854]
openldap-2.6.10/openldap-2.6.10/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): [#def855]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1283:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘save_cb’
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1264:11: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1270:13: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1270:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1276:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1282:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c:1283:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def856]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/translucent.c: scope_hint: In function ‘translucent_bind’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def857]
openldap-2.6.10/openldap-2.6.10/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): [#def858]
openldap-2.6.10/openldap-2.6.10/servers/slapd/overlays/unique.c: scope_hint: In function ‘unique_new_domain’
openldap-2.6.10/openldap-2.6.10/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): [#def859]
openldap-2.6.10/openldap-2.6.10/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): [#def860]
openldap-2.6.10/openldap-2.6.10/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: [#def861]
openldap-2.6.10/openldap-2.6.10/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: [#def862]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-457): [#def863]
openldap-2.6.10/openldap-2.6.10/servers/slapd/passwd.c: scope_hint: In function ‘passwd_extop’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def864]
openldap-2.6.10/openldap-2.6.10/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): [#def865]
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1261:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e_flags’
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1044:16: release_memory: ‘e_flags’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1073:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1077:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1090:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1099:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1133:12: branch_false: following ‘false’ branch (when ‘rc != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1145:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1194:49: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1195:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1200:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1224:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1224:20: branch_false: following ‘false’ branch (when ‘attrsonly == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1249:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1250:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1250:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1261:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1261:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1261:63: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1261:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1261:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def866]
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1426:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e_flags’
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1044:16: release_memory: ‘e_flags’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1073:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1077:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1090:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1099:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1133:12: branch_false: following ‘false’ branch (when ‘rc != -1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1145:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1361:49: branch_true: following ‘true’ branch (when ‘a’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1362:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1366:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1389:24: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1389:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1400:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1401:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1413:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1413:20: branch_true: following ‘true’ branch (when ‘attrsonly == 0’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1414:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1415:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1415:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1426:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1426:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1426:63: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1426:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/result.c:1426:63: release_memory: ‘e_flags’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def867]
openldap-2.6.10/openldap-2.6.10/servers/slapd/root_dse.c: scope_hint: In function ‘root_dse_info’
openldap-2.6.10/openldap-2.6.10/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: [#def868]
openldap-2.6.10/openldap-2.6.10/servers/slapd/saslauthz.c: scope_hint: In function ‘authzValidate’
openldap-2.6.10/openldap-2.6.10/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: [#def869]
openldap-2.6.10/openldap-2.6.10/servers/slapd/saslauthz.c: scope_hint: In function ‘authzPrettyNormal’
openldap-2.6.10/openldap-2.6.10/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: [#def870]
openldap-2.6.10/openldap-2.6.10/servers/slapd/saslauthz.c: scope_hint: In function ‘slap_parseURI’
openldap-2.6.10/openldap-2.6.10/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): [#def871]
openldap-2.6.10/openldap-2.6.10/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): [#def872]
openldap-2.6.10/openldap-2.6.10/servers/slapd/saslauthz.c: scope_hint: In function ‘slap_sasl_rewrite_config’
openldap-2.6.10/openldap-2.6.10/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): [#def873]
openldap-2.6.10/openldap-2.6.10/servers/slapd/saslauthz.c:1442: warning[uninitvar]: Uninitialized variable: rc
# 1440|   	}
# 1441|   
# 1442|-> 	return rc;
# 1443|   }
# 1444|   

Error: CPPCHECK_WARNING (CWE-909): [#def874]
openldap-2.6.10/openldap-2.6.10/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): [#def875]
openldap-2.6.10/openldap-2.6.10/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): [#def876]
openldap-2.6.10/openldap-2.6.10/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): [#def877]
openldap-2.6.10/openldap-2.6.10/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): [#def878]
openldap-2.6.10/openldap-2.6.10/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): [#def879]
openldap-2.6.10/openldap-2.6.10/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): [#def880]
openldap-2.6.10/openldap-2.6.10/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): [#def881]
openldap-2.6.10/openldap-2.6.10/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): [#def882]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:126:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘prev_DN_strict’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:110:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:117:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:120:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:124:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:125:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:126:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c:126:25: danger: use of uninitialized value ‘prev_DN_strict’ here
#  124|   		e = str2entry2( buf, checkvals );
#  125|   		if ( !dbnum ) {
#  126|-> 			slap_DN_strict = prev_DN_strict;
#  127|   		}
#  128|   

Error: COMPILER_WARNING (CWE-457): [#def883]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapadd.c: scope_hint: In function ‘getrec0’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def884]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:203:30: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:122:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:127:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:127:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:133:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:133:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:139:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:139:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:145:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:145:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:151:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:151:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:157:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:157:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:163:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:163:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:169:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:169:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:175:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:175:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:179:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:179:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:185:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:185:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:192:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:192:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:200:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:200:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:201:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:201:17: branch_true: following ‘true’ branch (when ‘tool == 1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:202:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:203:30: danger: argument 1 (‘p’) NULL where non-null expected
#  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): [#def885]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:221:30: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:122:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:127:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:127:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:133:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:133:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:139:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:139:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:145:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:145:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:151:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:151:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:157:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:157:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:163:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:163:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:169:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:169:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:175:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:175:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:179:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:179:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:185:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:185:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:192:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:192:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:200:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:200:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:218:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:218:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:219:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:219:17: branch_true: following ‘true’ branch (when ‘tool == 1’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:220:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapcommon.c:221:30: danger: argument 1 (‘p’) NULL where non-null expected
#  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): [#def886]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:82:33: warning[-Wanalyzer-null-argument]: use of NULL ‘pdn.bv_val’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:49:17: branch_true: following ‘true’ branch (when ‘argc != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:51:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:51:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:52:33: release_memory: ‘ndn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:70:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:80:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:82:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def887]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:86:33: warning[-Wanalyzer-null-argument]: use of NULL ‘ndn.bv_val’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:49:17: branch_true: following ‘true’ branch (when ‘argc != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:51:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:51:33: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:52:33: release_memory: ‘ndn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:70:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:80:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapdn.c:86:33: release_memory: ‘ndn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/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): [#def888]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:171:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pSavePB’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:158:9: branch_true: following ‘true’ branch (when ‘be’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:160:18: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:161:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:164:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:164:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:164:25: branch_false: following ‘false’ branch (when ‘index >= 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:165:48: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:165:33: branch_false: following ‘false’ branch (when ‘pos >= index’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:170:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:170:20: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c:171:30: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def889]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/plugin.c: scope_hint: In function ‘slapi_int_register_plugin_index’
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-775): [#def890]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:87:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(slapi_log_file, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:60:9: branch_true: following ‘true’ branch (when ‘subsystem’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:63:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:66:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:71:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:87:25: danger: ‘fopen(slapi_log_file, "a")’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   85|   		}
#   86|   #else
#   87|-> 		while ( lockf( fileno( fp ), F_LOCK, 0 ) != 0 ) {
#   88|   			/* DO NOTHING */ ;
#   89|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def891]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:87:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(slapi_log_file, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:60:9: branch_true: following ‘true’ branch (when ‘subsystem’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:63:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:66:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:71:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:87:25: danger: ‘fopen(slapi_log_file, "a")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   85|   		}
#   86|   #else
#   87|-> 		while ( lockf( fileno( fp ), F_LOCK, 0 ) != 0 ) {
#   88|   			/* DO NOTHING */ ;
#   89|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def892]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:102:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(slapi_log_file, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:60:9: branch_true: following ‘true’ branch (when ‘subsystem’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:63:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:66:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:71:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:102:17: danger: ‘fopen(slapi_log_file, "a")’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  100|   			fputs( "\n", fp );
#  101|   		}
#  102|-> 		fflush( fp );
#  103|   
#  104|   #ifdef _WIN32

Error: GCC_ANALYZER_WARNING (CWE-401): [#def893]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:102:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(slapi_log_file, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:60:9: branch_true: following ‘true’ branch (when ‘subsystem’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:63:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:66:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:71:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:102:17: danger: ‘fopen(slapi_log_file, "a")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  100|   			fputs( "\n", fp );
#  101|   		}
#  102|-> 		fflush( fp );
#  103|   
#  104|   #ifdef _WIN32

Error: GCC_ANALYZER_WARNING (CWE-775): [#def894]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:107:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(slapi_log_file, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:60:9: branch_true: following ‘true’ branch (when ‘subsystem’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:63:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:66:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:71:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:107:17: danger: ‘fopen(slapi_log_file, "a")’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  105|   		UnlockFile( fhandle, 0, 0, UINT_MAX, UINT_MAX );
#  106|   #else
#  107|-> 		lockf( fileno( fp ), F_ULOCK, 0 );
#  108|   #endif
#  109|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def895]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:107:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(slapi_log_file, "a")’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:60:9: branch_true: following ‘true’ branch (when ‘subsystem’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:61:9: branch_true: following ‘true’ branch (when ‘fmt’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:63:9: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:66:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:70:22: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:71:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c:107:17: danger: ‘fopen(slapi_log_file, "a")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  105|   		UnlockFile( fhandle, 0, 0, UINT_MAX, UINT_MAX );
#  106|   #else
#  107|-> 		lockf( fileno( fp ), F_ULOCK, 0 );
#  108|   #endif
#  109|   

Error: COMPILER_WARNING (CWE-252): [#def896]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/printmsg.c: scope_hint: In function ‘slapi_int_log_error’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-404): [#def897]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/slapi_utils.c:1945:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/slapi_utils.c:1944:9: acquire_resource: ‘va_start’ called here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapi/slapi_utils.c:1945:14: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1943|   
# 1944|   	va_start( arglist, fmt );
# 1945|-> 	rc = slapi_int_log_error( severity, subsystem, fmt, arglist );
# 1946|   	va_end( arglist );
# 1947|   

Error: CPPCHECK_WARNING (CWE-457): [#def898]
openldap-2.6.10/openldap-2.6.10/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: [#def899]
openldap-2.6.10/openldap-2.6.10/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: [#def900]
openldap-2.6.10/openldap-2.6.10/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.10 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-563): [#def901]
openldap-2.6.10/openldap-2.6.10/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): [#def902]
openldap-2.6.10/openldap-2.6.10/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): [#def903]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c: scope_hint: In function ‘slapmodify’
openldap-2.6.10/openldap-2.6.10/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): [#def904]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:595:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘id’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:73:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:74:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:90:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:91:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:136:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:143:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:152:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:155:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:155:20: branch_false: following ‘false’ branch (when ‘enable_meter == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:163:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:170:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:178:26: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:207:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:215:21: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:244:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:274:26: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:295:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:302:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:302:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:463:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:566:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:567:34: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:584:27: branch_false: following ‘false’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:592:31: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:594:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:595:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def905]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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): [#def906]
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:624:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘sid’
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:73:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:74:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:90:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:91:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:618:12: branch_false: following ‘false’ branch (when ‘enable_meter == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:623:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:623:12: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/slapmodify.c:624:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def907]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/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: COMPILER_WARNING (CWE-563): [#def908]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c: scope_hint: In function ‘check_syncprov’
openldap-2.6.10/openldap-2.6.10/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): [#def909]
openldap-2.6.10/openldap-2.6.10/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.10/openldap-2.6.10/servers/slapd/syncrepl.c: scope_hint: In function ‘do_syncrepl’
openldap-2.6.10/openldap-2.6.10/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: COMPILER_WARNING (CWE-563): [#def910]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_modify_cb’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2804:24: warning[-Wunused-variable]: unused variable ‘ml’
# 2804 |         Modifications *ml;
#      |                        ^~
# 2802|   	slap_callback *sc = op->o_callback;
# 2803|   	modify_ctxt *mx = sc->sc_private;
# 2804|-> 	Modifications *ml;
# 2805|   
# 2806|   	op->orm_no_opattrs = 0;

Error: CPPCHECK_WARNING (CWE-562): [#def911]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3210: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3208|   	}
# 3209|   
# 3210|-> 	op->o_callback = &cb;
# 3211|   	slap_op_time( &op->o_time, &op->o_tincr );
# 3212|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def912]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3441:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syncUUID’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3387:1: enter_function: entry to ‘syncrepl_message_to_entry’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3412:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3419:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3422:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3429:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3436:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3440:81: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3440:23: call_function: calling ‘slap_uuidstr_from_normalized’ from ‘syncrepl_message_to_entry’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3440:23: return_function: returning to ‘syncrepl_message_to_entry’ from ‘slap_uuidstr_from_normalized’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3441:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3441:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3441:17: danger: dereference of NULL ‘syncUUID’
# 3439|   		 */
# 3440|   		(void)slap_uuidstr_from_normalized( &syncUUID[1], &syncUUID[0], op->o_tmpmemctx );
# 3441|-> 		Debug( LDAP_DEBUG_SYNC,
# 3442|   			"syncrepl_message_to_entry: %s DN: %s, UUID: %s\n",
# 3443|   			si->si_ridtxt, bdn.bv_val, syncUUID[1].bv_val );

Error: CPPCHECK_WARNING (CWE-562): [#def913]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:3891: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3889|   		cb.sc_private = si;
# 3890|   
# 3891|-> 		op->o_callback = &cb;
# 3892|   		op->o_req_dn = si->si_contextdn;
# 3893|   		op->o_req_ndn = si->si_contextdn;

Error: CPPCHECK_WARNING (CWE-562): [#def914]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4204: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4202|   
# 4203|   	/* set callback function */
# 4204|-> 	op->o_callback = &cb;
# 4205|   	cb.sc_response = dn_callback;
# 4206|   	cb.sc_private = &dni;

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

Error: CPPCHECK_WARNING (CWE-562): [#def916]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4741: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4739|   	cb.sc_private = si;
# 4740|   
# 4741|-> 	op->o_callback = &cb;
# 4742|   	op->o_tag = LDAP_REQ_SEARCH;
# 4743|   	op->ors_scope = si->si_scope;

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def918]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: warning[-Wanalyzer-null-argument]: use of NULL ‘pdn.bv_val’ where non-null expected
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4726:23: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4726:23: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4749:12: branch_false: following ‘false’ branch (when ‘uuids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4782:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4799:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4804:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4813:25: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4814:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: release_memory: ‘pdn.bv_val’ is NULL
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4815:38: danger: argument 2 (‘mmaa.aa_value.bv_val’) NULL where non-null expected
# 4813|   			BER_BVZERO( &f->f_av_value );
# 4814|   			for ( i=0; i<sc->numcsns; i++ ) {
# 4815|-> 				if ( ber_bvcmp( &sc->ctxcsn[i], &f->f_av_value ) > 0 )
# 4816|   					f->f_av_value = sc->ctxcsn[i];
# 4817|   			}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def919]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4830:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘of’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4749:12: branch_false: following ‘false’ branch (when ‘uuids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4782:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4799:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4823:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4829:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4830:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4830:25: danger: use of uninitialized value ‘of’ here
# 4828|   		rc = be->be_search( op, &rs_search );
# 4829|   		if ( SLAP_MULTIPROVIDER( op->o_bd )) {
# 4830|-> 			op->ors_filter = of;
# 4831|   		}
# 4832|   		if ( op->ors_filter ) filter_free_x( op, op->ors_filter, 1 );

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

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

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

Error: CPPCHECK_WARNING (CWE-562): [#def923]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:4971: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4969|   
# 4970|   	op->o_tag = LDAP_REQ_ADD;
# 4971|-> 	op->o_callback = &cb;
# 4972|   	cb.sc_response = syncrepl_null_callback;
# 4973|   	cb.sc_private = NULL;

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

Error: CPPCHECK_WARNING (CWE-562): [#def925]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5113: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5111|   
# 5112|   	op->o_tag = LDAP_REQ_ADD;
# 5113|-> 	op->o_callback = &cb;
# 5114|   	cb.sc_response = syncrepl_null_callback;
# 5115|   	cb.sc_private = NULL;

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

Error: CPPCHECK_WARNING (CWE-562): [#def927]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5168: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5166|   	cb.sc_private = si;
# 5167|   
# 5168|-> 	op->o_callback = &cb;
# 5169|   	op->o_req_dn = si->si_contextdn;
# 5170|   	op->o_req_ndn = si->si_contextdn;

Error: CPPCHECK_WARNING (CWE-562): [#def928]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5293: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5291|   	cb.sc_private = si;
# 5292|   
# 5293|-> 	op->o_callback = &cb;
# 5294|   	op->o_req_dn = si->si_contextdn;
# 5295|   	op->o_req_ndn = si->si_contextdn;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def929]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5411:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5387:12: branch_true: following ‘true’ branch (when ‘old’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5391:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5391:51: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5392:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5392:51: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5395:17: branch_true: following ‘true’ branch (when ‘o != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5396:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5396:17: branch_true: following ‘true’ branch (when ‘n != 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5399:24: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5407:28: branch_true: following ‘true’ branch (when ‘i < o’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5408:36: branch_true: following ‘true’ branch (when ‘j < n’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5409:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5414:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5415:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5414:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5415:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5415:41: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5407:28: branch_true: following ‘true’ branch (when ‘i < o’)...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5408:36: branch_true: following ‘true’ branch (when ‘j < n’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5409:43: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5409:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5411:38: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5411:38: release_memory: using NULL here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5411:38: danger: dereference of NULL ‘*<unknown>’
# 5409|   				if ( !adds[j] )
# 5410|   					continue;
# 5411|-> 				if ( bvmatch( dels[i], adds[j] ) ) {
# 5412|   					no--;
# 5413|   					nn--;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def930]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5807:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘is_ctx’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5672:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5673:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5673:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5678:71: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5684:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5691:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5691:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5737:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5795:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5806:80: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5807:41: danger: use of uninitialized value ‘is_ctx’ here
# 5805|   				{
# 5806|   					Attribute *old = attrs_exdup( op, dni, rs->sr_entry->e_attrs );
# 5807|-> 					syncrepl_diff_entry( op, old,
# 5808|   						dni->new_entry->e_attrs, &dni->mods, dni->modlist,
# 5809|   						is_ctx );

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

Error: GCC_ANALYZER_WARNING (CWE-457): [#def932]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:5968:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*normalized.bv_len’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2045:1: enter_function: entry to ‘do_syncrepl’
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2060:12: branch_false: following ‘false’ branch (when ‘si’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2062:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2062:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2065:15: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2065:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2070:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2076:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2080:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2092:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2105:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2154:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2165:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2165:19: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2169:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2169:12: branch_false: following ‘false’ branch (when ‘rc != -104’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2176:12: branch_true: following ‘true’ branch (when ‘rc == 0’)...
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2177:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:2194:22: call_function: calling ‘do_syncrep2’ from ‘do_syncrepl’
# 5966|   
# 5967|   	if ( normalized == NULL ) return NULL;
# 5968|-> 	if ( normalized->bv_len != 16 ) return NULL;
# 5969|   
# 5970|   	if ( uuidstr ) {

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

Error: CPPCHECK_WARNING (CWE-457): [#def934]
openldap-2.6.10/openldap-2.6.10/servers/slapd/syncrepl.c:7606: warning[uninitvar]: Uninitialized variable: *sip
# 7604|   			int i;
# 7605|   
# 7606|-> 			for ( sip = &c->be->be_syncinfo, i=0; *sip; i++ ) {
# 7607|   				si = *sip;
# 7608|   				if ( c->valx == -1 || i == c->valx ) {

Error: COMPILER_WARNING (CWE-457): [#def935]
openldap-2.6.10/openldap-2.6.10/servers/slapd/txn.c: scope_hint: In function ‘txn_end_extop’
openldap-2.6.10/openldap-2.6.10/servers/slapd/txn.c:368:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  368 |         return rc;
#      |                ^~
openldap-2.6.10/openldap-2.6.10/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: [#def936]
openldap-2.6.10/openldap-2.6.10/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-401): [#def937]
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:99:17: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:159:1: enter_function: entry to ‘filter_stdin’
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:169:17: branch_true: following ‘true’ branch (when ‘eof == 0’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:170:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:170:22: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:173:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:176:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:181:20: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:181:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:188:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:188:40: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:188:27: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:189:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:189:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:189:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:189:25: call_function: calling ‘xrealloc’ from ‘filter_stdin’
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:189:25: return_function: returning to ‘filter_stdin’ from ‘xrealloc’
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:192:25: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:192:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:192:25: call_function: calling ‘xrealloc’ from ‘filter_stdin’
#   97|   {
#   98|   	if ( (ptr = realloc( ptr, len )) == NULL ) {
#   99|-> 		perror( progname );
#  100|   		exit( EXIT_FAILURE );
#  101|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def938]
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:114:9: warning[-Wanalyzer-null-argument]: use of NULL ‘ss.val’ where non-null expected
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:159:1: enter_function: entry to ‘filter_stdin’
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:162:17: release_memory: ‘ss.val’ is NULL
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:169:17: branch_true: following ‘true’ branch (when ‘eof == 0’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:170:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:170:22: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:173:28: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:176:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:178:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:178:27: branch_true: following ‘true’ branch (when ‘prev_eol != 0’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:179:35: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:181:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:186:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:188:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:188:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:198:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:198:20: branch_false: following ‘false’ branch (when ‘attrs_totlen == 0’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/ldif-filter.c:205:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def939]
openldap-2.6.10/openldap-2.6.10/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): [#def940]
openldap-2.6.10/openldap-2.6.10/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-401): [#def941]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:469:20: branch_false: following ‘false’ branch (when ‘done == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:24: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  400|   	}
#  401|   
#  402|-> 	while ( ( rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ONE, NULL, &res ) ) > 0 )
#  403|   	{
#  404|   		BerElement *ber;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def942]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:469:20: branch_false: following ‘false’ branch (when ‘done == 0’)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  406|   		int done = 0;
#  407|   
#  408|-> 		for ( msg = ldap_first_message( ld, res ); msg;
#  409|   			msg = ldap_next_message( ld, msg ) )
#  410|   		{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def943]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:409:31: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:409:31: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  407|   
#  408|   		for ( msg = ldap_first_message( ld, res ); msg;
#  409|-> 			msg = ldap_next_message( ld, msg ) )
#  410|   		{
#  411|   			switch ( ldap_msgtype( msg ) ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def944]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:411:34: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:60: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:411:34: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:411:34: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  409|   			msg = ldap_next_message( ld, msg ) )
#  410|   		{
#  411|-> 			switch ( ldap_msgtype( msg ) ) {
#  412|   			case LDAP_RES_SEARCH_ENTRY:
#  413|   				rc = ldap_get_dn_ber( ld, msg, &ber, &bv );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def945]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:413:38: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:60: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:411:34: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:413:38: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  411|   			switch ( ldap_msgtype( msg ) ) {
#  412|   			case LDAP_RES_SEARCH_ENTRY:
#  413|-> 				rc = ldap_get_dn_ber( ld, msg, &ber, &bv );
#  414|   				dns = realloc( dns, (ndns + 1)*sizeof(char *) );
#  415|   				if ( !dns ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def946]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:416:41: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:60: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:411:34: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_true: following ‘true’ branch (when ‘dns’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:416:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:416:41: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  414|   				dns = realloc( dns, (ndns + 1)*sizeof(char *) );
#  415|   				if ( !dns ) {
#  416|-> 					tester_error( "realloc failed" );
#  417|   					exit( EXIT_FAILURE );
#  418|   				}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def947]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:45: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:45: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  417|   					exit( EXIT_FAILURE );
#  418|   				}
#  419|-> 				dns[ndns] = ber_strdup( bv.bv_val );
#  420|   				if ( pwattr != NULL ) {
#  421|   					struct berval	**values = ldap_get_values_len( ld, msg, pwattr );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def948]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:421:68: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_true: following ‘true’ branch (when ‘pwattr’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:421:68: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:421:68: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  419|   				dns[ndns] = ber_strdup( bv.bv_val );
#  420|   				if ( pwattr != NULL ) {
#  421|-> 					struct berval	**values = ldap_get_values_len( ld, msg, pwattr );
#  422|   
#  423|   					creds = realloc( creds, (ndns + 1)*sizeof(struct berval) );

Error: GCC_ANALYZER_WARNING (CWE-415): [#def949]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:423:49: warning[-Wanalyzer-double-free]: double-‘free’ of ‘creds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_true: following ‘true’ branch (when ‘pwattr’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:421:68: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def950]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  456|   				}
#  457|   				ndns++;
#  458|-> 				ber_free( ber, 0 );
#  459|   				break;
#  460|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def951]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:468:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dns’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:397:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:402:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:408:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:415:36: branch_false: following ‘false’ branch (when ‘dns’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:419:57: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:420:36: branch_false: following ‘false’ branch (when ‘pwattr’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:458:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-bind.c:468:17: danger: ‘dns’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  466|   				break;
#  467|   		}
#  468|-> 		ldap_msgfree( res );
#  469|   		if ( done ) break;
#  470|   	}

Error: COMPILER_WARNING (CWE-457): [#def952]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c: scope_hint: In function ‘tester_init_ld’
openldap-2.6.10/openldap-2.6.10/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): [#def953]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:523:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:483:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:488:16: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:492:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:493:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:493:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:517:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:517:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-common.c:523:20: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def954]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:137:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p2’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def955]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def956]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:148:15: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def957]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:159:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:160:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:160:17: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  158|   retry:;
#  159|   	if ( ld == NULL ) {
#  160|-> 		tester_init_ld( &ld, config, 0 );
#  161|   	}
#  162|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def958]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(strdup(entry))’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:149:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:159:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:160:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:160:17: danger: ‘strdup(strdup(entry))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  158|   retry:;
#  159|   	if ( ld == NULL ) {
#  160|-> 		tester_init_ld( &ld, config, 0 );
#  161|   	}
#  162|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def959]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  167|   
#  168|   	for ( ; i < config->loops; i++ ) {
#  169|-> 		rc = ldap_rename_s( ld, DNs[0], rdns[0], NULL, 0, NULL, NULL );
#  170|   		if ( rc != LDAP_SUCCESS ) {
#  171|   			tester_ldap_error( ld, "ldap_rename_s", NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def960]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(strdup(entry))’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:149:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: danger: ‘strdup(strdup(entry))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  167|   
#  168|   	for ( ; i < config->loops; i++ ) {
#  169|-> 		rc = ldap_rename_s( ld, DNs[0], rdns[0], NULL, 0, NULL, NULL );
#  170|   		if ( rc != LDAP_SUCCESS ) {
#  171|   			tester_ldap_error( ld, "ldap_rename_s", NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def961]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:171:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:170:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:171:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:171:25: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  169|   		rc = ldap_rename_s( ld, DNs[0], rdns[0], NULL, 0, NULL, NULL );
#  170|   		if ( rc != LDAP_SUCCESS ) {
#  171|-> 			tester_ldap_error( ld, "ldap_rename_s", NULL );
#  172|   			switch ( rc ) {
#  173|   			case LDAP_NO_SUCH_OBJECT:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def962]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:171:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(strdup(entry))’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:149:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:170:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:171:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:171:25: danger: ‘strdup(strdup(entry))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  169|   		rc = ldap_rename_s( ld, DNs[0], rdns[0], NULL, 0, NULL, NULL );
#  170|   		if ( rc != LDAP_SUCCESS ) {
#  171|-> 			tester_ldap_error( ld, "ldap_rename_s", NULL );
#  172|   			switch ( rc ) {
#  173|   			case LDAP_NO_SUCH_OBJECT:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def963]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:194:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:194:22: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  192|   			}
#  193|   		}
#  194|-> 		rc = ldap_rename_s( ld, DNs[1], rdns[1], NULL, 1, NULL, NULL );
#  195|   		if ( rc != LDAP_SUCCESS ) {
#  196|   			tester_ldap_error( ld, "ldap_rename_s", NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def964]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:194:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(strdup(entry))’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:149:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:194:22: danger: ‘strdup(strdup(entry))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  192|   			}
#  193|   		}
#  194|-> 		rc = ldap_rename_s( ld, DNs[1], rdns[1], NULL, 1, NULL, NULL );
#  195|   		if ( rc != LDAP_SUCCESS ) {
#  196|   			tester_ldap_error( ld, "ldap_rename_s", NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def965]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:196:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:195:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:196:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:196:25: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  194|   		rc = ldap_rename_s( ld, DNs[1], rdns[1], NULL, 1, NULL, NULL );
#  195|   		if ( rc != LDAP_SUCCESS ) {
#  196|-> 			tester_ldap_error( ld, "ldap_rename_s", NULL );
#  197|   			switch ( rc ) {
#  198|   			case LDAP_NO_SUCH_OBJECT:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def966]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:196:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(strdup(entry))’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:149:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:168:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:169:22: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:195:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:196:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:196:25: danger: ‘strdup(strdup(entry))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  194|   		rc = ldap_rename_s( ld, DNs[1], rdns[1], NULL, 1, NULL, NULL );
#  195|   		if ( rc != LDAP_SUCCESS ) {
#  196|-> 			tester_ldap_error( ld, "ldap_rename_s", NULL );
#  197|   			switch ( rc ) {
#  198|   			case LDAP_NO_SUCH_OBJECT:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def967]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:224:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:127:18: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:224:9: danger: ‘strdup(entry)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  222|   	fprintf( stderr, "  PID=%ld - Modrdn done (%d).\n", (long) pid, rc );
#  223|   
#  224|-> 	ldap_unbind_ext( ld, NULL, NULL );
#  225|   
#  226|   	free( DNs[1] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def968]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:224:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(strdup(entry))’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:128:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:134:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:139:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:143:10: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:149:19: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:150:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:154:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-modrdn.c:224:9: danger: ‘strdup(strdup(entry))’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  222|   	fprintf( stderr, "  PID=%ld - Modrdn done (%d).\n", (long) pid, rc );
#  223|   
#  224|-> 	ldap_unbind_ext( ld, NULL, NULL );
#  225|   
#  226|   	free( DNs[1] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def969]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:109:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:348:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:349:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:349:33: call_function: calling ‘thread_error’ from ‘do_onethread’
#  107|   
#  108|   	snprintf(thrstr, BUFSIZ, "error on tidx: %d: %s", idx, string);
#  109|-> 	tester_error( thrstr );
#  110|   }
#  111|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def970]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:390:1: enter_function: entry to ‘do_onerwthread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:454:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:466:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:468:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:479:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:479:33: call_function: calling ‘thread_output’ from ‘do_onerwthread’
#  116|   
#  117|   	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  118|-> 	tester_error( thrstr );
#  119|   }
#  120|   

Error: COMPILER_WARNING: [#def971]
openldap-2.6.10/openldap-2.6.10/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: [#def972]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c: scope_hint: In function ‘do_read.isra.0’
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def973]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:129:9: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:390:1: enter_function: entry to ‘do_onerwthread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:444:17: call_function: inlined call to ‘thread_verbose’ from ‘do_onerwthread’
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:444:17: call_function: inlined call to ‘thread_verbose’ from ‘do_onerwthread’
#  127|   		return;
#  128|   	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  129|-> 	tester_error( thrstr );
#  130|   }
#  131|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def974]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:129:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:500:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:548:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:549:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:552:25: call_function: inlined call to ‘thread_verbose’ from ‘do_random’
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:552:25: call_function: inlined call to ‘thread_verbose’ from ‘do_random’
#  127|   		return;
#  128|   	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  129|-> 	tester_error( thrstr );
#  130|   }
#  131|   

Error: COMPILER_WARNING (CWE-563): [#def975]
openldap-2.6.10/openldap-2.6.10/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): [#def976]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c: scope_hint: In function ‘main’
openldap-2.6.10/openldap-2.6.10/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: [#def977]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c: scope_hint: In function ‘main’
openldap-2.6.10/openldap-2.6.10/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): [#def978]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:35: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:35: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  345|   	for ( j = 0; j < config->outerloops; j++ ) {
#  346|   		for(i = 0; i < noconns; i++) {
#  347|-> 			mlds[i] = ldap_dup(lds[i]);
#  348|   			if (mlds[i] == NULL) {
#  349|   				thread_error( idx, "ldap_dup error" );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def979]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:352:22: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:352:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:352:22: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  350|   			}
#  351|   		}
#  352|-> 		rc = ldap_get_option(mlds[0], LDAP_OPT_SESSION_REFCNT, &refcnt);
#  353|   		snprintf(thrstr, BUFSIZ,
#  354|   			"RO Thread conns: %d refcnt: %d (rc = %d)",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def980]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:363:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:352:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:362:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:363:25: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  361|   		if (mlds[thisconn] == NULL) {
#  362|   			thread_error( idx, "(failed to dup)");
#  363|-> 			tester_perror( "ldap_dup", "(failed to dup)" );
#  364|   			exit( EXIT_FAILURE );
#  365|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def981]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:435:35: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:435:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:435:35: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  433|   	for ( j = 0; j < config->outerloops; j++ ) {
#  434|   		for(i = 0; i < noconns; i++) {
#  435|-> 			mlds[i] = ldap_dup(lds[i]);
#  436|   			if (mlds[i] == NULL) {
#  437|   				thread_error( idx, "ldap_dup error" );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def982]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  438|   			}
#  439|   		}
#  440|-> 		rc = ldap_get_option(mlds[0], LDAP_OPT_SESSION_REFCNT, &refcnt);
#  441|   		snprintf(thrstr, BUFSIZ,
#  442|   			"RW Thread conns: %d refcnt: %d (rc = %d)",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def983]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:451:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:450:25: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:451:25: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  449|   		if (mlds[thisconn] == NULL) {
#  450|   			thread_error( idx, "(failed to dup)");
#  451|-> 			tester_perror( "ldap_dup", "(failed to dup)" );
#  452|   			exit( EXIT_FAILURE );
#  453|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def984]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:454:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:466:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  465|   		dels = 0;
#  466|   		for (i = 0; i < config->loops; i++) {
#  467|-> 			ret = ldap_add_ext_s(ld, dn, &attrp[0], NULL, NULL);
#  468|   			if (ret == LDAP_SUCCESS) {
#  469|   				adds++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def985]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:470:39: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:454:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:466:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:468:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:469:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:470:39: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  468|   			if (ret == LDAP_SUCCESS) {
#  469|   				adds++;
#  470|-> 				ret = ldap_delete_ext_s(ld, dn, NULL, NULL);
#  471|   				if (ret == LDAP_SUCCESS) {
#  472|   					dels++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def986]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:475:41: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:454:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:466:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:468:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:469:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:471:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:475:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:475:41: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  473|   					rt_pass[idx]++;
#  474|   				} else {
#  475|-> 					thread_output(idx, ldap_err2string(ret));
#  476|   					rt_fail[idx]++;
#  477|   				}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def987]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:479:33: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:454:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:466:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:467:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:468:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:479:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:479:33: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  477|   				}
#  478|   			} else {
#  479|-> 				thread_output(idx, ldap_err2string(ret));
#  480|   				rt_fail[idx]++;
#  481|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def988]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:490:32: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:407:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:408:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:413:9: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:416:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:417:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:433:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:434:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:440:22: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:449:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:454:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:466:29: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:484:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:489:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:490:49: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:490:32: danger: ‘mlds’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  488|   
#  489|   		for(i = 0; i < noconns; i++) {
#  490|-> 			(void) ldap_destroy(mlds[i]);
#  491|   			mlds[i] = NULL;
#  492|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def989]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:520:14: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: call_function: calling ‘do_random’ from ‘do_onethread’
#  518|   	thread_verbose( idx, thrstr );
#  519|   
#  520|-> 	rc = ldap_search_ext_s( ld, sbase, LDAP_SCOPE_SUBTREE,
#  521|   		filter, attrs, 0, NULL, NULL, NULL, LDAP_NO_LIMIT, &res );
#  522|   	switch ( rc ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def990]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:526:27: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: call_function: calling ‘do_random’ from ‘do_onethread’
#  524|   	case LDAP_TIMELIMIT_EXCEEDED:
#  525|   	case LDAP_SUCCESS:
#  526|-> 		nvalues = ldap_count_entries( ld, res );
#  527|   		if ( nvalues == 0 ) {
#  528|   			if ( rc ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def991]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:529:33: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: call_function: calling ‘do_random’ from ‘do_onethread’
#  527|   		if ( nvalues == 0 ) {
#  528|   			if ( rc ) {
#  529|-> 				tester_ldap_error( ld, "ldap_search_ext_s", NULL );
#  530|   			}
#  531|   			ldap_msgfree( res );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def992]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:531:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: call_function: calling ‘do_random’ from ‘do_onethread’
#  529|   				tester_ldap_error( ld, "ldap_search_ext_s", NULL );
#  530|   			}
#  531|-> 			ldap_msgfree( res );
#  532|   			break;
#  533|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def993]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: call_function: calling ‘do_random’ from ‘do_onethread’
#  538|   			exit( EXIT_FAILURE );
#  539|   		}
#  540|-> 		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  541|   		{
#  542|   			values[ i ] = ldap_get_dn( ld, e );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def994]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  538|   			exit( EXIT_FAILURE );
#  539|   		}
#  540|-> 		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  541|   		{
#  542|   			values[ i ] = ldap_get_dn( ld, e );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def995]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:83: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:63: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:542:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:83: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  538|   			exit( EXIT_FAILURE );
#  539|   		}
#  540|-> 		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  541|   		{
#  542|   			values[ i ] = ldap_get_dn( ld, e );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def996]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:542:39: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:373:33: call_function: calling ‘do_random’ from ‘do_onethread’
#  540|   		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  541|   		{
#  542|-> 			values[ i ] = ldap_get_dn( ld, e );
#  543|   		}
#  544|   		values[ i ] = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def997]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:542:39: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:63: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:542:31: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:542:39: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  540|   		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  541|   		{
#  542|-> 			values[ i ] = ldap_get_dn( ld, e );
#  543|   		}
#  544|   		values[ i ] = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def998]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:546:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:546:17: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/4)
#  544|   		values[ i ] = NULL;
#  545|   
#  546|-> 		ldap_msgfree( res );
#  547|   
#  548|   		if ( do_retry == config->retries ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def999]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:563:33: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:555:30: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:561:29: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:562:35: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:562:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:563:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:563:33: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  561|   		for( i = 0; i < nvalues; i++) {
#  562|   			if (values[i] != NULL)
#  563|-> 				ldap_memfree( values[i] );
#  564|   		}
#  565|   		free( values );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1000]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:615:22: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: call_function: calling ‘do_random2’ from ‘do_onethread’
#  613|   		sprintf(fbuf, "%.*s%d%s", flen, filter, r, ftail);
#  614|   
#  615|-> 		rc = ldap_search_ext_s( ld, sbase, LDAP_SCOPE_SUBTREE,
#  616|   				fbuf, srchattrs, noattrs, NULL, NULL, NULL,
#  617|   				LDAP_NO_LIMIT, &res );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1001]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:619:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: call_function: calling ‘do_random2’ from ‘do_onethread’
#  617|   				LDAP_NO_LIMIT, &res );
#  618|   		if ( res != NULL ) {
#  619|-> 			ldap_msgfree( res );
#  620|   		}
#  621|   		if ( rc == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1002]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:624:49: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: call_function: calling ‘do_random2’ from ‘do_onethread’
#  622|   			rt_pass[idx]++;
#  623|   		} else {
#  624|-> 			int		first = tester_ignore_err( rc );
#  625|   			char		buf[ BUFSIZ ];
#  626|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1003]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:634:41: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: call_function: calling ‘do_random2’ from ‘do_onethread’
#  632|   				/* only log if first occurrence */
#  633|   				if ( ( force < 2 && first > 0 ) || abs(first) == 1 ) {
#  634|-> 					tester_ldap_error( ld, buf, NULL );
#  635|   				}
#  636|   				continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1004]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:640:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:29: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:369:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:370:33: call_function: calling ‘do_random2’ from ‘do_onethread’
#  638|   
#  639|   			/* busy needs special handling */
#  640|-> 			tester_ldap_error( ld, buf, NULL );
#  641|   			if ( rc == LDAP_BUSY && do_retry > 0 ) {
#  642|   				do_retry--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1005]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:676:22: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: call_function: calling ‘do_read’ from ‘do_onethread’
#  674|   		LDAPMessage *res = NULL;
#  675|   
#  676|-> 		rc = ldap_search_ext_s( ld, entry, LDAP_SCOPE_BASE,
#  677|   				NULL, attrs, noattrs, NULL, NULL, NULL,
#  678|   				LDAP_NO_LIMIT, &res );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1006]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:676:22: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:500:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:555:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:556:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:558:25: call_function: calling ‘do_read’ from ‘do_random’
#  674|   		LDAPMessage *res = NULL;
#  675|   
#  676|-> 		rc = ldap_search_ext_s( ld, entry, LDAP_SCOPE_BASE,
#  677|   				NULL, attrs, noattrs, NULL, NULL, NULL,
#  678|   				LDAP_NO_LIMIT, &res );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1007]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:680:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: call_function: calling ‘do_read’ from ‘do_onethread’
#  678|   				LDAP_NO_LIMIT, &res );
#  679|   		if ( res != NULL ) {
#  680|-> 			ldap_msgfree( res );
#  681|   		}
#  682|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1008]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:680:25: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:500:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:555:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:556:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:558:25: call_function: calling ‘do_read’ from ‘do_random’
#  678|   				LDAP_NO_LIMIT, &res );
#  679|   		if ( res != NULL ) {
#  680|-> 			ldap_msgfree( res );
#  681|   		}
#  682|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1009]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:686:49: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: call_function: calling ‘do_read’ from ‘do_onethread’
#  684|   			rt_pass[idx]++;
#  685|   		} else {
#  686|-> 			int		first = tester_ignore_err( rc );
#  687|   			char		buf[ BUFSIZ ];
#  688|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1010]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:686:49: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:500:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:555:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:556:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:558:25: call_function: calling ‘do_read’ from ‘do_random’
#  684|   			rt_pass[idx]++;
#  685|   		} else {
#  686|-> 			int		first = tester_ignore_err( rc );
#  687|   			char		buf[ BUFSIZ ];
#  688|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1011]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:702:25: warning[-Wanalyzer-malloc-leak]: leak of ‘mlds’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:331:1: enter_function: entry to ‘do_onethread’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:339:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:340:12: branch_false: following ‘false’ branch (when ‘mlds’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:345:22: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:346:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:347:47: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:361:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:366:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:368:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:377:25: call_function: calling ‘do_read’ from ‘do_onethread’
#  700|   
#  701|   			/* busy needs special handling */
#  702|-> 			tester_ldap_error( ld, buf, NULL );
#  703|   			if ( rc == LDAP_BUSY && do_retry > 0 ) {
#  704|   				do_retry--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1012]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:702:25: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:500:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:527:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:535:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:536:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:540:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:555:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:556:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-mtread.c:558:25: call_function: calling ‘do_read’ from ‘do_random’
#  700|   
#  701|   			/* busy needs special handling */
#  702|-> 			tester_ldap_error( ld, buf, NULL );
#  703|   			if ( rc == LDAP_BUSY && do_retry > 0 ) {
#  704|   				do_retry--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1013]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  207|   			exit( EXIT_FAILURE );
#  208|   		}
#  209|-> 		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  210|   		{
#  211|   			values[ i ] = ldap_get_dn( ld, e );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1014]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:83: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:63: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:211:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:83: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  207|   			exit( EXIT_FAILURE );
#  208|   		}
#  209|-> 		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  210|   		{
#  211|   			values[ i ] = ldap_get_dn( ld, e );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1015]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:211:39: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:63: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:211:39: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:211:39: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  209|   		for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) )
#  210|   		{
#  211|-> 			values[ i ] = ldap_get_dn( ld, e );
#  212|   		}
#  213|   		values[ i ] = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1016]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:215:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:215:17: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  213|   		values[ i ] = NULL;
#  214|   
#  215|-> 		ldap_msgfree( res );
#  216|   
#  217|   		if ( do_retry == config->retries ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1017]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:259:25: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:169:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:222:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:226:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:228:25: call_function: calling ‘do_read’ from ‘do_random’
#  257|   		msgids = (int *)calloc( sizeof(int), maxloop );
#  258|   		if ( !msgids ) {
#  259|-> 			tester_error( "calloc failed" );
#  260|   			exit( EXIT_FAILURE );
#  261|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1018]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:266:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_false: following ‘false’ branch (when ‘ldp’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:18: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:256:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:258:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:264:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:265:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:266:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:266:17: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  264|   retry:;
#  265|   	if ( ld == NULL ) {
#  266|-> 		tester_init_ld( &ld, config, nobind );
#  267|   	}
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1019]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:266:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:169:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:222:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:226:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:228:25: call_function: calling ‘do_read’ from ‘do_random’
#  264|   retry:;
#  265|   	if ( ld == NULL ) {
#  266|-> 		tester_init_ld( &ld, config, nobind );
#  267|   	}
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1020]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:280:38: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_false: following ‘false’ branch (when ‘ldp’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:18: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:256:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:258:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:264:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:265:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:266:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:274:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:279:28: branch_true: following ‘true’ branch (when ‘i < maxloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:282:77: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:280:38: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  278|   
#  279|   			if ( i < maxloop ) {
#  280|-> 				rc = ldap_search_ext( ld, entry, LDAP_SCOPE_BASE,
#  281|   						NULL, attrs, noattrs, NULL, NULL,
#  282|   						NULL, LDAP_NO_LIMIT, &msgids[i] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1021]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:280:38: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:169:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:222:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:226:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:228:25: call_function: calling ‘do_read’ from ‘do_random’
#  278|   
#  279|   			if ( i < maxloop ) {
#  280|-> 				rc = ldap_search_ext( ld, entry, LDAP_SCOPE_BASE,
#  281|   						NULL, attrs, noattrs, NULL, NULL,
#  282|   						NULL, LDAP_NO_LIMIT, &msgids[i] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1022]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:296:53: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:169:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:222:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:226:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:228:25: call_function: calling ‘do_read’ from ‘do_random’
#  294|   				if ( rc ) {
#  295|   					char buf[BUFSIZ];
#  296|-> 					int first = tester_ignore_err( rc );
#  297|   					/* if ignore.. */
#  298|   					if ( first ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1023]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:308:41: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:169:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:222:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:226:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:228:25: call_function: calling ‘do_read’ from ‘do_random’
#  306|   					/* busy needs special handling */
#  307|   					snprintf( buf, sizeof( buf ), "entry=\"%s\"\n", entry );
#  308|-> 					tester_ldap_error( ld, "ldap_search_ext", buf );
#  309|   					if ( rc == LDAP_BUSY && do_retry > 0 ) {
#  310|   						ldap_unbind_ext( ld, NULL, NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1024]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:310:49: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:169:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:197:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:204:26: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:205:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:209:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:222:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:226:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:228:25: call_function: calling ‘do_read’ from ‘do_random’
#  308|   					tester_ldap_error( ld, "ldap_search_ext", buf );
#  309|   					if ( rc == LDAP_BUSY && do_retry > 0 ) {
#  310|-> 						ldap_unbind_ext( ld, NULL, NULL );
#  311|   						ld = NULL;
#  312|   						do_retry--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1025]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:323:30: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:256:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:258:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:264:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:274:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:279:28: branch_false: following ‘false’ branch (when ‘i >= maxloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:323:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:323:30: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  321|   			}
#  322|   
#  323|-> 			rc = ldap_result( ld, LDAP_RES_ANY, 0, NULL, &res );
#  324|   			switch ( rc ) {
#  325|   			case -1:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1026]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:346:41: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:256:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:258:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:264:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:274:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:279:28: branch_false: following ‘false’ branch (when ‘i >= maxloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:323:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:346:41: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  344|   			case LDAP_RES_SEARCH_RESULT:
#  345|   				/* just remove, no error checking (TODO?) */
#  346|-> 				msgid = ldap_msgid( res );
#  347|   				ldap_parse_result( ld, res, &rc, NULL, NULL, NULL, NULL, 1 );
#  348|   				res = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1027]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:347:33: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:256:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:258:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:264:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:274:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:279:28: branch_false: following ‘false’ branch (when ‘i >= maxloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:323:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:347:33: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  345|   				/* just remove, no error checking (TODO?) */
#  346|   				msgid = ldap_msgid( res );
#  347|-> 				ldap_parse_result( ld, res, &rc, NULL, NULL, NULL, NULL, 1 );
#  348|   				res = NULL;
#  349|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1028]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:377:33: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:250:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:256:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:257:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:258:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:264:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:274:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:279:28: branch_false: following ‘false’ branch (when ‘i >= maxloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:323:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:376:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:377:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-read.c:377:33: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  375|   
#  376|   			if ( res != NULL ) {
#  377|-> 				ldap_msgfree( res );
#  378|   			}
#  379|   		} while ( i < maxloop || active > 0 );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1029]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:71: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:74: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:65: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:71: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#  219|   		}
#  220|   
#  221|-> 		for ( e = ldap_first_entry( ld, res ); e != NULL; e = ldap_next_entry( ld, e ) )
#  222|   		{
#  223|   			struct berval **v = ldap_get_values_len( ld, e, attr );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1030]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:71: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:71: danger: ‘values’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  219|   		}
#  220|   
#  221|-> 		for ( e = ldap_first_entry( ld, res ); e != NULL; e = ldap_next_entry( ld, e ) )
#  222|   		{
#  223|   			struct berval **v = ldap_get_values_len( ld, e, attr );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1031]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:74: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:65: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
#  221|   		for ( e = ldap_first_entry( ld, res ); e != NULL; e = ldap_next_entry( ld, e ) )
#  222|   		{
#  223|-> 			struct berval **v = ldap_get_values_len( ld, e, attr );
#  224|   
#  225|   			if ( v != NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1032]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: danger: ‘values’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  221|   		for ( e = ldap_first_entry( ld, res ); e != NULL; e = ldap_next_entry( ld, e ) )
#  222|   		{
#  223|-> 			struct berval **v = ldap_get_values_len( ld, e, attr );
#  224|   
#  225|   			if ( v != NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1033]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:74: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:65: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/13)
#  224|   
#  225|   			if ( v != NULL ) {
#  226|-> 				int n = ldap_count_values_len( v );
#  227|   				int j;
#  228|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1034]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: danger: ‘values’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  224|   
#  225|   			if ( v != NULL ) {
#  226|-> 				int n = ldap_count_values_len( v );
#  227|   				int j;
#  228|   

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1038]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:239:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:74: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:65: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:239:33: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/13)
#  237|   				values[ nvalues + j ] = NULL;
#  238|   				nvalues += n;
#  239|-> 				ldap_value_free_len( v );
#  240|   			}
#  241|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1039]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:239:33: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:239:33: danger: ‘values’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  237|   				values[ nvalues + j ] = NULL;
#  238|   				nvalues += n;
#  239|-> 				ldap_value_free_len( v );
#  240|   			}
#  241|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1040]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:74: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:235:65: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/13)
#  241|   		}
#  242|   
#  243|-> 		ldap_msgfree( res );
#  244|   
#  245|   		if ( !values ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1041]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: danger: ‘values’ leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
#  241|   		}
#  242|   
#  243|-> 		ldap_msgfree( res );
#  244|   
#  245|   		if ( !values ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1042]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:308:25: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:190:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:245:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:251:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:256:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:261:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:265:25: call_function: calling ‘do_search’ from ‘do_random’
#  306|   		msgids = (int *)calloc( sizeof(int), innerloop );
#  307|   		if ( !msgids ) {
#  308|-> 			tester_error( "calloc failed" );
#  309|   			exit( EXIT_FAILURE );
#  310|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1043]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_false: following ‘false’ branch (when ‘ldp’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:18: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:314:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:321:35: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  313|   retry:;
#  314|   	if ( ld == NULL ) {
#  315|-> 		fprintf( stderr,
#  316|   			"PID=%ld - Search(%d): "
#  317|   			"base=\"%s\" scope=%s filter=\"%s\" "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1044]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:190:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:245:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:251:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:256:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:261:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:265:25: call_function: calling ‘do_search’ from ‘do_random’
#  313|   retry:;
#  314|   	if ( ld == NULL ) {
#  315|-> 		fprintf( stderr,
#  316|   			"PID=%ld - Search(%d): "
#  317|   			"base=\"%s\" scope=%s filter=\"%s\" "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1045]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:323:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_false: following ‘false’ branch (when ‘ldp’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:18: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:314:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:321:35: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:315:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:323:17: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  321|   			attrs[0], attrs[1] ? " (more...)" : "" );
#  322|   
#  323|-> 		tester_init_ld( &ld, config, nobind );
#  324|   	}
#  325|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1046]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:323:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:190:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:245:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:251:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:256:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:261:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:265:25: call_function: calling ‘do_search’ from ‘do_random’
#  321|   			attrs[0], attrs[1] ? " (more...)" : "" );
#  322|   
#  323|-> 		tester_init_ld( &ld, config, nobind );
#  324|   	}
#  325|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1047]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:332:38: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:326:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:331:28: branch_true: following ‘true’ branch (when ‘i < innerloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:334:77: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:332:38: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  330|   
#  331|   			if ( i < innerloop ) {
#  332|-> 				rc = ldap_search_ext( ld, sbase, scope,
#  333|   						filter, NULL, noattrs, NULL, NULL,
#  334|   						NULL, LDAP_NO_LIMIT, &msgids[i] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1048]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:332:38: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:190:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:245:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:251:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:256:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:261:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:265:25: call_function: calling ‘do_search’ from ‘do_random’
#  330|   
#  331|   			if ( i < innerloop ) {
#  332|-> 				rc = ldap_search_ext( ld, sbase, scope,
#  333|   						filter, NULL, noattrs, NULL, NULL,
#  334|   						NULL, LDAP_NO_LIMIT, &msgids[i] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1049]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:347:53: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:190:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:245:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:251:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:256:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:261:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:265:25: call_function: calling ‘do_search’ from ‘do_random’
#  345|   
#  346|   				if ( rc ) {
#  347|-> 					int first = tester_ignore_err( rc );
#  348|   					/* if ignore.. */
#  349|   					if ( first ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1050]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:361:41: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:190:1: enter_function: entry to ‘do_random’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:213:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:27: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:223:45: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:225:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:226:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:230:36: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:234:46: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:237:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:221:56: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:243:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:245:20: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:251:34: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:256:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:261:37: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:265:25: call_function: calling ‘do_search’ from ‘do_random’
#  359|   						"base=\"%s\" filter=\"%s\"\n",
#  360|   						sbase, filter );
#  361|-> 					tester_ldap_error( ld, "ldap_search_ext", buf );
#  362|   					if ( rc == LDAP_BUSY && do_retry > 0 ) {
#  363|   						ldap_unbind_ext( ld, NULL, NULL );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1051]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:326:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:331:28: branch_false: following ‘false’ branch (when ‘i >= innerloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  374|   			}
#  375|   
#  376|-> 			rc = ldap_result( ld, LDAP_RES_ANY, 0, NULL, &res );
#  377|   			switch ( rc ) {
#  378|   			case -1:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1052]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:393:41: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:326:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:331:28: branch_false: following ‘false’ branch (when ‘i >= innerloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:393:41: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  391|   			case LDAP_RES_SEARCH_RESULT:
#  392|   				/* just remove, no error checking (TODO?) */
#  393|-> 				msgid = ldap_msgid( res );
#  394|   				ldap_parse_result( ld, res, &rc, NULL, NULL, NULL, NULL, 1 );
#  395|   				res = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1053]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:394:33: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:326:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:331:28: branch_false: following ‘false’ branch (when ‘i >= innerloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:394:33: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  392|   				/* just remove, no error checking (TODO?) */
#  393|   				msgid = ldap_msgid( res );
#  394|-> 				ldap_parse_result( ld, res, &rc, NULL, NULL, NULL, NULL, 1 );
#  395|   				res = NULL;
#  396|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1054]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:416:33: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:326:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:331:28: branch_false: following ‘false’ branch (when ‘i >= innerloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:416:33: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:416:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:416:33: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
#  414|   			default:
#  415|   				/* other messages unexpected */
#  416|-> 				fprintf( stderr,
#  417|   					"### PID=%ld - Search(%d): "
#  418|   					"base=\"%s\" scope=%s filter=\"%s\" "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1055]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:427:33: warning[-Wanalyzer-malloc-leak]: leak of ‘msgids’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: following ‘true’ branch (when ‘ldp’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:298:23: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:305:12: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:306:33: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:307:20: branch_false: following ‘false’ branch (when ‘msgids’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:313:1: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:326:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:331:28: branch_false: following ‘false’ branch (when ‘i >= innerloop’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:376:30: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:426:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:427:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-search.c:427:33: danger: ‘msgids’ leaks here; was allocated at [(5)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/4)
#  425|   
#  426|   			if ( res != NULL ) {
#  427|-> 				ldap_msgfree( res );
#  428|   			}
#  429|   		} while ( i < innerloop || active > 0 );

Error: CPPCHECK_WARNING (CWE-476): [#def1056]
openldap-2.6.10/openldap-2.6.10/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): [#def1057]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:235:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:218:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:220:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:230:45: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/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): [#def1058]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:235:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘extra’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:218:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:220:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:230:45: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def1059]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:240:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:218:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:220:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:230:45: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:240:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:240:25: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  238|   			}
#  239|   
#  240|-> 			ldap_memfree( b );
#  241|   			} break;
#  242|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1060]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:240:25: warning[-Wanalyzer-malloc-leak]: leak of ‘extra’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:218:17: branch_true: following ‘true’ branch (when ‘i != -1’)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:220:17: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:230:45: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:234:40: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:233:38: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:240:25: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:240:25: danger: ‘extra’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  238|   			}
#  239|   
#  240|-> 			ldap_memfree( b );
#  241|   			} break;
#  242|   

Error: COMPILER_WARNING (CWE-563): [#def1061]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c: scope_hint: In function ‘get_search_filters’
openldap-2.6.10/openldap-2.6.10/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-775): [#def1062]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:932:38: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:20: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:918:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:922:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:923:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:28: branch_true: following ‘true’ branch (when ‘luds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:927:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:931:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:932:38: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  930|   				got_URL = 1;
#  931|   				bases[filter] = NULL;
#  932|-> 				if ( ldap_url_parse( line, &lud ) != LDAP_URL_SUCCESS ) {
#  933|   					filter = -filter - 1;
#  934|   					break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1063]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:932:38: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:918:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:922:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:923:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:28: branch_true: following ‘true’ branch (when ‘luds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:927:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:931:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:932:38: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  930|   				got_URL = 1;
#  931|   				bases[filter] = NULL;
#  932|-> 				if ( ldap_url_parse( line, &lud ) != LDAP_URL_SUCCESS ) {
#  933|   					filter = -filter - 1;
#  934|   					break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1064]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:939:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:20: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:918:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:922:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:923:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:28: branch_true: following ‘true’ branch (when ‘luds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:927:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:931:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:932:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:937:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:939:41: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  937|   				if ( lud->lud_dn == NULL || lud->lud_exts != NULL ) {
#  938|   					filter = -filter - 1;
#  939|-> 					ldap_free_urldesc( lud );
#  940|   					break;
#  941|   				}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1065]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:939:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:918:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:922:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:923:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:28: branch_true: following ‘true’ branch (when ‘luds’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:925:41: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:927:30: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:931:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:932:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:937:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:939:41: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  937|   				if ( lud->lud_dn == NULL || lud->lud_exts != NULL ) {
#  938|   					filter = -filter - 1;
#  939|-> 					ldap_free_urldesc( lud );
#  940|   					break;
#  941|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1066]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:955:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*filters’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:915:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:918:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:922:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:923:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:950:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:951:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:953:43: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:954:28: branch_true: following ‘true’ branch (when ‘attrs’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:955:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:955:38: danger: ‘strdup(&line)’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/8/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-775): [#def1067]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:38: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:20: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:988:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:991:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:992:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:993:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:38: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  994|   				LDAPURLDesc	*lud;
#  995|   
#  996|-> 				if ( ldap_url_parse( &line[1], &lud ) != LDAP_URL_SUCCESS ) {
#  997|   					entry = -entry - 1;
#  998|   					break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1068]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:38: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:988:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:991:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:992:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:993:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:38: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  994|   				LDAPURLDesc	*lud;
#  995|   
#  996|-> 				if ( ldap_url_parse( &line[1], &lud ) != LDAP_URL_SUCCESS ) {
#  997|   					entry = -entry - 1;
#  998|   					break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1069]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1002:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:20: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:988:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:991:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:992:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:993:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1001:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1002:41: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 1000|   
# 1001|   				if ( lud->lud_dn == NULL || lud->lud_dn[ 0 ] == '\0' ) {
# 1002|-> 					ldap_free_urldesc( lud );
# 1003|   					entry = -entry - 1;
# 1004|   					break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1070]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1002:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:988:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:991:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:992:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:993:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1001:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1002:41: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1000|   
# 1001|   				if ( lud->lud_dn == NULL || lud->lud_dn[ 0 ] == '\0' ) {
# 1002|-> 					ldap_free_urldesc( lud );
# 1003|   					entry = -entry - 1;
# 1004|   					break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1071]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1015:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:20: acquire_resource: opened here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:988:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:991:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:992:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:993:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1001:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1001:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1009:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1010:48: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1015:33: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1013|   					filters[entry] = ArgDup( "(objectClass=*)" );
# 1014|   				}
# 1015|-> 				ldap_free_urldesc( lud );
# 1016|   
# 1017|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1072]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1015:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:20: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:985:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:988:24: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:991:28: branch_true: following ‘true’ branch (when ‘nl’ is non-NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:992:33: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:993:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:996:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1001:41: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1001:36: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1009:36: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1010:48: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-tester.c:1015:33: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1013|   					filters[entry] = ArgDup( "(objectClass=*)" );
# 1014|   				}
# 1015|-> 				ldap_free_urldesc( lud );
# 1016|   
# 1017|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1073]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:644:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘servers’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:631:19: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:14: branch_true: following ‘true’ branch...
 branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:640:28: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:641:28: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:641:28: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:644:40: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def1074]
openldap-2.6.10/openldap-2.6.10/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): [#def1075]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:648:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘servers’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:631:19: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:647:22: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:648:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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): [#def1076]
openldap-2.6.10/openldap-2.6.10/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): [#def1077]
openldap-2.6.10/openldap-2.6.10/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): [#def1078]
openldap-2.6.10/openldap-2.6.10/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): [#def1079]
openldap-2.6.10/openldap-2.6.10/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): [#def1080]
openldap-2.6.10/openldap-2.6.10/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): [#def1081]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:657: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: 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): [#def1082]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:668:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘msg1’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:647:22: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:648:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:647:22: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:656:24: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:656:16: acquire_memory: this call could return NULL
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:666:27: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:667:38: branch_true: ...to here
openldap-2.6.10/openldap-2.6.10/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: GCC_ANALYZER_WARNING (CWE-401): [#def1083]
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:804:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msg1’
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:618:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:621:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:629:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:12: branch_false: following ‘false’ branch (when ‘sids’ is NULL)...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:639:14: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:647:22: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:656:24: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:656:16: acquire_memory: allocated here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:666:27: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:713:27: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:803:17: branch_false: ...to here
openldap-2.6.10/openldap-2.6.10/tests/progs/slapd-watcher.c:804:17: danger: ‘msg1’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  802|   		}
#  803|   		display();
#  804|-> 		sleep(interval);
#  805|   	}
#  806|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1084]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:98:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: return_function: returning to ‘read_config_file’ from ‘valid_word’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:45: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:233:67: call_function: calling ‘chomp’ from ‘read_config_file’
#   96|   char* chomp(char *s)
#   97|   {
#   98|-> 	char* t = ber_memalloc(strlen(s)+1);
#   99|   	strncpy (t,s,strlen(s)+1);
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1085]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:98:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: return_function: returning to ‘read_config_file’ from ‘valid_word’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:45: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:233:67: call_function: calling ‘chomp’ from ‘read_config_file’
#   96|   char* chomp(char *s)
#   97|   {
#   98|-> 	char* t = ber_memalloc(strlen(s)+1);
#   99|   	strncpy (t,s,strlen(s)+1);
#  100|   

Error: COMPILER_WARNING: [#def1086]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c: scope_hint: In function ‘chomp’
openldap-2.6.10/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.10/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' ) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1087]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:155:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
#  153|   
#  154|   #if defined(DEBUG)
#  155|-> 	syslog(LOG_NOTICE, "check_password: Validating parameter [%s]", word);
#  156|   #endif
#  157|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1088]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:155:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
#  153|   
#  154|   #if defined(DEBUG)
#  155|-> 	syslog(LOG_NOTICE, "check_password: Validating parameter [%s]", word);
#  156|   #endif
#  157|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1089]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:162:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
#  160|   		    strcmp(list[index].parameter, word) == 0) {
#  161|   #if defined(DEBUG)
#  162|-> 			syslog(LOG_NOTICE, "check_password: Parameter accepted.");
#  163|   #endif
#  164|   			return list[index].dealer;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1090]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:162:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
#  160|   		    strcmp(list[index].parameter, word) == 0) {
#  161|   #if defined(DEBUG)
#  162|-> 			syslog(LOG_NOTICE, "check_password: Parameter accepted.");
#  163|   #endif
#  164|   			return list[index].dealer;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1091]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:170:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
#  168|   
#  169|   #if defined(DEBUG)
#  170|-> 	syslog(LOG_NOTICE, "check_password: Parameter rejected.");
#  171|   #endif
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1092]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:170:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
#  168|   
#  169|   #if defined(DEBUG)
#  170|-> 	syslog(LOG_NOTICE, "check_password: Parameter rejected.");
#  171|   #endif
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1093]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: danger: ‘fopen("/etc/openldap/check_password.conf", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  204|   #if defined(DEBUG)
#  205|   		/* Debug traces to syslog. */
#  206|-> 		syslog(LOG_NOTICE, "check_password: Got line |%s|", line);
#  207|   #endif
#  208|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1094]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: danger: ‘fopen("/etc/openldap/check_password.conf", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  204|   #if defined(DEBUG)
#  205|   		/* Debug traces to syslog. */
#  206|-> 		syslog(LOG_NOTICE, "check_password: Got line |%s|", line);
#  207|   #endif
#  208|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1095]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:215:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:215:25: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:215:25: danger: ‘fopen("/etc/openldap/check_password.conf", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  213|   #if defined(DEBUG)
#  214|   			/* Debug traces to syslog. */
#  215|-> 			syslog(LOG_NOTICE, "check_password: Skipped line |%s|", line);
#  216|   #endif
#  217|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1096]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:215:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:215:25: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:215:25: danger: ‘fopen("/etc/openldap/check_password.conf", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  213|   #if defined(DEBUG)
#  214|   			/* Debug traces to syslog. */
#  215|-> 			syslog(LOG_NOTICE, "check_password: Skipped line |%s|", line);
#  216|   #endif
#  217|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1097]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_resource: opened here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: return_function: returning to ‘read_config_file’ from ‘valid_word’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:45: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: danger: ‘fopen("/etc/openldap/check_password.conf", "r")’ leaks here; was opened at [(4)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/3)
#  228|   
#  229|   #if defined(DEBUG)
#  230|-> 						syslog(LOG_NOTICE, "check_password: Word = %s, value = %s", word, value);
#  231|   #endif
#  232|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1098]
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/openldap/check_password.conf", "r")’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:176:12: enter_function: entry to ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:184:12: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:24: acquire_memory: allocated here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:188:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:199:16: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:206:17: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:212:20: branch_false: following ‘false’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_false: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:220:19: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:224:31: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:28: branch_true: following ‘true’ branch (when ‘word’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:71: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:225:29: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
 branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:226:41: branch_true: following ‘true’ branch (when ‘keyWord’ is non-NULL)...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:46: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:44: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: call_function: calling ‘valid_word’ from ‘read_config_file’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:103: return_function: returning to ‘read_config_file’ from ‘valid_word’
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:227:45: branch_true: following ‘true’ branch...
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: branch_true: ...to here
openldap-2.6.10/openldap-ppolicy-check-password-1.1/check_password.c:230:49: danger: ‘fopen("/etc/openldap/check_password.conf", "r")’ leaks here; was allocated at [(4)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/3)
#  228|   
#  229|   #if defined(DEBUG)
#  230|-> 						syslog(LOG_NOTICE, "check_password: Word = %s, value = %s", word, value);
#  231|   #endif
#  232|   

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-207.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameopenldap-2.6.10-4.fc44
store-results-to/tmp/tmpz6cwc642/openldap-2.6.10-4.fc44.tar.xz
time-created2025-10-28 19:34:56
time-finished2025-10-28 19:40:11
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpz6cwc642/openldap-2.6.10-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpz6cwc642/openldap-2.6.10-4.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9