Skip to content

Commit

Permalink
QUIC: client transport parameter data length checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
pluknet committed May 28, 2024
1 parent 71ca978 commit 683e304
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/event/quic/ngx_event_quic_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 683e304

Please sign in to comment.