]> git.kaiwu.me - nginx.git/commitdiff
Fixed parsing NGX_QUIC_FT_CONNECTION_CLOSE.
authorSergey Kandaurov <pluknet@nginx.com>
Sat, 21 Mar 2020 16:45:24 +0000 (19:45 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Sat, 21 Mar 2020 16:45:24 +0000 (19:45 +0300)
src/event/ngx_event_quic_transport.c

index 826af2bdd68aa3fd1ba7d62d1540df45a2d8306c..e03194b80721bf561458ff2c36d038b35940d51c 100644 (file)
@@ -662,9 +662,11 @@ ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
 
         if (f->type == NGX_QUIC_FT_CONNECTION_CLOSE) {
             p = ngx_quic_parse_int(p, end, &f->u.close.frame_type);
-            ngx_log_error(NGX_LOG_ERR, pkt->log, 0,
-                          "failed to parse close connection frame type");
-            return NGX_ERROR;
+            if (p == NULL) {
+                ngx_log_error(NGX_LOG_ERR, pkt->log, 0,
+                              "failed to parse close connection frame type");
+                return NGX_ERROR;
+            }
         }
 
         p = ngx_quic_parse_int(p, end, &varint);