Fixed buffer overrun in create_transport_params() with -24.

It writes 16-bit prefix as designed, but length calculation assumed varint.
This commit is contained in:
Sergey Kandaurov 2020-03-21 19:22:39 +03:00
parent 4764ef1590
commit 79e49c2a16

View File

@ -1136,7 +1136,7 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp)
if (pos == NULL) {
#if (quic_version < 0xff00001b)
len += ngx_quic_varint_len(len);
len += 2;
#endif
return len;
}