QUIC WIRE: RFC 9000 s. 19.6

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21547)
This commit is contained in:
Hugo Landau 2023-07-25 11:32:25 +01:00 committed by Matt Caswell
parent 098914d0b7
commit 67e72ed575

View File

@ -618,6 +618,10 @@ int ossl_quic_wire_decode_frame_crypto(PACKET *pkt,
|| f->len > SIZE_MAX /* sizeof(uint64_t) > sizeof(size_t)? */)
return 0;
if (f->offset + f->len > (((uint64_t)1) << 62) - 1)
/* RFC 9000 s. 19.6 */
return 0;
if (nodata) {
f->data = NULL;
} else {