From: Tomas Mraz Date: Wed, 1 Mar 2023 09:28:58 +0000 (+0100) Subject: stream_frame_new(): Add missing allocation check X-Git-Tag: openssl-3.2.0-alpha1~1194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf762f9203d3b5541c21f2b376750e32ebf36651;p=thirdparty%2Fopenssl.git stream_frame_new(): Add missing allocation check Reported by Marc Schönefeld. Reviewed-by: Matt Caswell Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/19794) --- diff --git a/ssl/quic/quic_sf_list.c b/ssl/quic/quic_sf_list.c index 56803b2a97f..b53cbc17395 100644 --- a/ssl/quic/quic_sf_list.c +++ b/ssl/quic/quic_sf_list.c @@ -29,6 +29,9 @@ static STREAM_FRAME *stream_frame_new(UINT_RANGE *range, OSSL_QRX_PKT *pkt, { STREAM_FRAME *sf = OPENSSL_zalloc(sizeof(*sf)); + if (sf == NULL) + return NULL; + if (pkt != NULL) ossl_qrx_pkt_up_ref(pkt);