X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fpoly1305%2Fpoly1305_pmeth.c;h=3bc24c98cd614705fadb005a57f8f050bd68f6e1;hb=2459dc1bd09468c83f1767b6b6a1ddc45ba60d36;hp=7bc6add6811bc491990f3d0e3983ec18026c1ff7;hpb=52ad5b60e3a1fef12a1a5ea01527a90b8f92a34b;p=oweals%2Fopenssl.git diff --git a/crypto/poly1305/poly1305_pmeth.c b/crypto/poly1305/poly1305_pmeth.c index 7bc6add681..3bc24c98cd 100644 --- a/crypto/poly1305/poly1305_pmeth.c +++ b/crypto/poly1305/poly1305_pmeth.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2007-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 @@ -12,6 +12,7 @@ #include #include #include +#include #include "internal/poly1305.h" #include "poly1305_local.h" #include "internal/evp_int.h" @@ -27,9 +28,10 @@ static int pkey_poly1305_init(EVP_PKEY_CTX *ctx) { POLY1305_PKEY_CTX *pctx; - pctx = OPENSSL_zalloc(sizeof(*pctx)); - if (pctx == NULL) + if ((pctx = OPENSSL_zalloc(sizeof(*pctx))) == NULL) { + CRYPTOerr(CRYPTO_F_PKEY_POLY1305_INIT, ERR_R_MALLOC_FAILURE); return 0; + } pctx->ktmp.type = V_ASN1_OCTET_STRING; EVP_PKEY_CTX_set_data(ctx, pctx);