]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: fixed handling of zero-length literal field line.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 28 May 2024 13:20:45 +0000 (17:20 +0400)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 28 May 2024 13:20:45 +0000 (17:20 +0400)
Previously, st->value was passed with NULL data pointer to header handlers.

src/http/v3/ngx_http_v3_parse.c

index 568816323e1ff633d062b03b04ea8eac157d2c88..436765c8a4026aee8804beca1afe790dd9a38c74 100644 (file)
@@ -810,6 +810,7 @@ ngx_http_v3_parse_field_lri(ngx_connection_t *c,
 
             st->literal.length = st->pint.value;
             if (st->literal.length == 0) {
+                st->value.data = (u_char *) "";
                 goto done;
             }
 
@@ -932,6 +933,7 @@ ngx_http_v3_parse_field_l(ngx_connection_t *c,
 
             st->literal.length = st->pint.value;
             if (st->literal.length == 0) {
+                st->value.data = (u_char *) "";
                 goto done;
             }
 
@@ -1072,6 +1074,7 @@ ngx_http_v3_parse_field_lpbi(ngx_connection_t *c,
 
             st->literal.length = st->pint.value;
             if (st->literal.length == 0) {
+                st->value.data = (u_char *) "";
                 goto done;
             }