Klaus Demo nginx / c32d9d2
HTTP/2: fixed null pointer dereference with server push. r->headers_in.host can be NULL in ngx_http_v2_push_resource(). This happens when a request is terminated with 400 before the :authority or Host header is parsed, and either pushing is enabled on the server{} level or error_page 400 redirects to a location with pushes configured. Found by Coverity (CID 1429156). Ruslan Ermilov 1 year, 8 months ago
1 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
945945
946946 host = r->headers_in.host;
947947
948 if (authority->len == 0 && host) {
948 if (host == NULL) {
949 return NGX_ABORT;
950 }
951
952 if (authority->len == 0) {
949953
950954 len = 1 + NGX_HTTP_V2_INT_OCTETS + host->value.len;
951955