QUIC: client transport parameter data length checking.

This commit is contained in:
Sergey Kandaurov 2024-05-28 17:17:19 +04:00
parent 75e3004902
commit eaa6daa5f5

View File

@ -1750,6 +1750,14 @@ ngx_quic_parse_transport_params(u_char *p, u_char *end, ngx_quic_tp_t *tp,
return NGX_ERROR;
}
if ((size_t) (end - p) < len) {
ngx_log_error(NGX_LOG_INFO, log, 0,
"quic failed to parse"
" transport param id:0x%xL, data length %uL too long",
id, len);
return NGX_ERROR;
}
rc = ngx_quic_parse_transport_param(p, p + len, id, tp);
if (rc == NGX_ERROR) {