changeset 9285:4c7a9355bcae

HTTP/3: fixed handling of zero-length literal field line. Previously, st->value was passed with NULL data pointer to header handlers.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 28 May 2024 17:20:45 +0400
parents 5c6649b4308f
children d9fe808c1841
files src/http/v3/ngx_http_v3_parse.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3_parse.c	Tue May 28 17:19:21 2024 +0400
+++ b/src/http/v3/ngx_http_v3_parse.c	Tue May 28 17:20:45 2024 +0400
@@ -810,6 +810,7 @@
 
             st->literal.length = st->pint.value;
             if (st->literal.length == 0) {
+                st->value.data = (u_char *) "";
                 goto done;
             }
 
@@ -932,6 +933,7 @@
 
             st->literal.length = st->pint.value;
             if (st->literal.length == 0) {
+                st->value.data = (u_char *) "";
                 goto done;
             }
 
@@ -1072,6 +1074,7 @@
 
             st->literal.length = st->pint.value;
             if (st->literal.length == 0) {
+                st->value.data = (u_char *) "";
                 goto done;
             }