http: http2_handle_continuation_frame coverity fix 06/43106/2
authorMatus Fabian <[email protected]>
Sun, 8 Jun 2025 17:38:13 +0000 (13:38 -0400)
committerFlorin Coras <[email protected]>
Tue, 10 Jun 2025 06:18:12 +0000 (06:18 +0000)
Type: fix

Change-Id: I05b4308dd689d1977b59c6ef5791561f7e45693c
Signed-off-by: Matus Fabian <[email protected]>
src/plugins/http/http2/http2.c

index 36a27f4..f9f281f 100644 (file)
@@ -1198,6 +1198,8 @@ http2_handle_continuation_frame (http_conn_t *hc, http2_frame_header_t *fh)
       if (fh->flags & HTTP2_FRAME_FLAG_END_HEADERS)
        {
          req = http2_conn_get_req (hc, fh->stream_id);
+         if (!req)
+           return HTTP2_ERROR_PROTOCOL_ERROR;
          h2c->flags &= ~HTTP2_CONN_F_EXPECT_CONTINUATION;
          req->payload = h2c->unparsed_headers;
          req->payload_len = vec_len (h2c->unparsed_headers);