From: Dr. Stephen Henson Date: Mon, 21 Mar 2011 17:37:27 +0000 (+0000) Subject: Use a signed value to check return value of do_cipher(). X-Git-Tag: OpenSSL-fips-2_0-rc1~650 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4fc02f1229e2b692ec52f01a38f8cba93c13ec84;p=oweals%2Fopenssl.git Use a signed value to check return value of do_cipher(). --- diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index c016d1ed62..87af9c4931 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -368,11 +368,11 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) { - i = ctx->cipher->do_cipher(ctx, out, NULL, 0); - if (i < 0) + ret = ctx->cipher->do_cipher(ctx, out, NULL, 0); + if (ret < 0) return 0; else - *outl = i; + *outl = ret; return 1; }