Skip to content

Commit

Permalink
stream_frame_new(): Add missing allocation check
Browse files Browse the repository at this point in the history
Reported by Marc Schönefeld.

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
(Merged from openssl#19794)
  • Loading branch information
t8m committed Mar 6, 2023
1 parent 7fa2160 commit bf762f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ssl/quic/quic_sf_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bf762f9

Please sign in to comment.