From: Jonas Maebe Date: Sun, 8 Dec 2013 16:16:12 +0000 (+0100) Subject: rtcp_new: return failure if allocation of bi->ptr failed X-Git-Tag: master-post-reformat~505 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e64f671c97650b060f20b6d930a88f1a2a306f7;p=oweals%2Fopenssl.git rtcp_new: return failure if allocation of bi->ptr failed Signed-off-by: Kurt Roeckx Reviewed-by: Rich Salz --- 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;