From 4e64f671c97650b060f20b6d930a88f1a2a306f7 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 8 Dec 2013 17:16:12 +0100 Subject: [PATCH] rtcp_new: return failure if allocation of bi->ptr failed Signed-off-by: Kurt Roeckx Reviewed-by: Rich Salz --- crypto/bio/bss_rtcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/bio/bss_rtcp.c b/crypto/bio/bss_rtcp.c index 7dae485564..d0cd1a9680 100644 --- a/crypto/bio/bss_rtcp.c +++ b/crypto/bio/bss_rtcp.c @@ -157,6 +157,8 @@ static int rtcp_new(BIO *bi) bi->num=0; bi->flags = 0; bi->ptr=OPENSSL_malloc(sizeof(struct rpc_ctx)); + if (bi->ptr == NULL) + return(0); ctx = (struct rpc_ctx *) bi->ptr; ctx->filled = 0; ctx->pos = 0; -- 2.25.1