aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2024-05-28 17:20:45 +0400
committerSergey Kandaurov <pluknet@nginx.com>2024-05-28 17:20:45 +0400
commit34bd899287e2e00cbd00e2f60e5013b12e7b95b0 (patch)
treefa69cc1483e86e8716528cd5da50f0fc29e9ffe6
parent9ddc6a08f4c83db5acc0a74c223ddf75a44b726d (diff)
downloadnginx-34bd899287e2e00cbd00e2f60e5013b12e7b95b0.tar.gz
nginx-34bd899287e2e00cbd00e2f60e5013b12e7b95b0.zip
HTTP/3: fixed handling of zero-length literal field line.
Previously, st->value was passed with NULL data pointer to header handlers.
-rw-r--r--src/http/v3/ngx_http_v3_parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/http/v3/ngx_http_v3_parse.c b/src/http/v3/ngx_http_v3_parse.c
index 568816323..436765c8a 100644
--- a/src/http/v3/ngx_http_v3_parse.c
+++ b/src/http/v3/ngx_http_v3_parse.c
@@ -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;
}