]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
stream_frame_new(): Add missing allocation check
authorTomas Mraz <tomas@openssl.org>
Wed, 1 Mar 2023 09:28:58 +0000 (10:28 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 6 Mar 2023 11:26:16 +0000 (12:26 +0100)
Reported by Marc Schönefeld.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19794)

ssl/quic/quic_sf_list.c

index 56803b2a97f5d0297600b2c1e0589a55a0ecd3bd..b53cbc173953eec8b1c1c26d9d1449ea7749892a 100644 (file)
@@ -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);