From: Howard Chu Date: Fri, 21 Feb 2003 02:14:46 +0000 (+0000) Subject: Fix ITS#2320, check for NULL re->re_replicas X-Git-Tag: NO_SLAP_OP_BLOCKS~333 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9c701c886170bf7dbdeee457edab328b8020ae13;p=openldap Fix ITS#2320, check for NULL re->re_replicas --- diff --git a/servers/slurpd/re.c b/servers/slurpd/re.c index d93a1682a4..1100396a87 100644 --- a/servers/slurpd/re.c +++ b/servers/slurpd/re.c @@ -583,7 +583,7 @@ Re_write( goto bad; } } else { /* write multiple "replica:" lines */ - for ( i = 0; re->re_replicas[ i ].rh_hostname != NULL; i++ ) { + for ( i = 0; re->re_replicas && re->re_replicas[ i ].rh_hostname != NULL; i++ ) { if ( fprintf( fp, "replica: %s:%d\n", re->re_replicas[ i ].rh_hostname, re->re_replicas[ i ].rh_port ) < 0 ) {