]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: fixed null pointer dereference with server push.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 22 Sep 2021 11:10:43 +0000 (14:10 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 22 Sep 2021 11:10:43 +0000 (14:10 +0300)
See details for HTTP/2 fix in 8b0553239592 for a complete description.

src/http/v3/ngx_http_v3_filter_module.c

index 43d2cd1bd32c9b0674b3b3cffc77d1d4d8a0e6e1..a88b32f0768b760f49b5287675acea99cfc44f2b 100644 (file)
@@ -858,6 +858,10 @@ ngx_http_v3_push_resource(ngx_http_request_t *r, ngx_str_t *path,
         return NGX_ABORT;
     }
 
+    if (r->headers_in.host == NULL) {
+        return NGX_ABORT;
+    }
+
     push_id = h3c->next_push_id++;
 
     rc = ngx_http_v3_create_push_request(r, path, push_id);