Skip to content

Commit 17caaca

Browse files
committed
Compatibility: added segfault prevent routine for the issues/75
1 parent 9ba24a2 commit 17caaca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ngx_http_vhost_traffic_status_display.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,10 @@ ngx_http_vhost_traffic_status_display_set_upstream_group(ngx_http_request_t *r,
10811081
continue;
10821082
}
10831083

1084+
if (us[j].addrs == NULL) {
1085+
continue;
1086+
}
1087+
10841088
p = ngx_cpymem(p, uscf->host.data, uscf->host.len);
10851089
*p++ = NGX_HTTP_VHOST_TRAFFIC_STATUS_KEY_SEPARATOR;
10861090
p = ngx_cpymem(p, us[j].addrs->name.data, us[j].addrs->name.len);

0 commit comments

Comments
 (0)