Skip to content
Snippets Groups Projects
Commit 9c701c88 authored by Howard Chu's avatar Howard Chu
Browse files

Fix ITS#2320, check for NULL re->re_replicas

parent 13b63911
Branches
Tags
No related merge requests found
......@@ -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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment