From: Luke Howard Date: Sat, 26 Apr 2003 03:28:12 +0000 (+0000) Subject: Don't crash in slapi_send_ldap_search_entry if no attributes specified X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~237 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b0e2fd5a8b92f7e9435d3d48bb00fc4828681518;p=openldap Don't crash in slapi_send_ldap_search_entry if no attributes specified --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index ec0488e20d..55f6e934fa 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1408,8 +1408,12 @@ slapi_send_ldap_search_entry( AttributeName *an = NULL; const char *text; - for ( i = 0; attrs[ i ] != NULL; i++ ) { - ; /* empty */ + if ( attrs != NULL ) { + for ( i = 0; attrs[ i ] != NULL; i++ ) { + ; /* empty */ + } + } else { + i = 0; } if ( i > 0 ) {