X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fbio_enc.c;h=6639061eae9ae392672881ba10be3cc5cbd613e6;hb=7467c87c6e88acca887bac0bf85ec0dc76fa522d;hp=30f09e6d5fdc559a98fcffde4935fdddf256923b;hpb=fce78bd4ede74d4fa7bd1c8195d8f7bc9403bd4c;p=oweals%2Fopenssl.git diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index 30f09e6d5f..6639061eae 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -65,9 +65,10 @@ static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; - ctx = OPENSSL_zalloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) { + EVPerr(EVP_F_ENC_NEW, ERR_R_MALLOC_FAILURE); return 0; + } ctx->cipher = EVP_CIPHER_CTX_new(); if (ctx->cipher == NULL) {