summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-02-07 18:04:27 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-02-07 18:04:27 +0000
commitd45087c672bd24467e6aea4ef05dbe6a5c420d5a (patch)
treecd1f1538eb805928364aa178fb93dbe086729ae8 /crypto/evp/evp_enc.c
parent634b66186ab76ba4133248f84d076fe94134f257 (diff)
Use 0 not -1 (since type is size_t) for finalisation argument to do_cipher:
the NULL value for the input buffer is sufficient to notice this case.
Diffstat (limited to 'crypto/evp/evp_enc.c')
-rw-r--r--crypto/evp/evp_enc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index 3f8473b348..c016d1ed62 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -368,10 +368,10 @@ 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, -1);
+ i = ctx->cipher->do_cipher(ctx, out, NULL, 0);
if (i < 0)
return 0;
- else
+ else
*outl = i;
return 1;
}
@@ -483,7 +483,7 @@ int EVP_DecryptFinal_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, -1);
+ i = ctx->cipher->do_cipher(ctx, out, NULL, 0);
if (i < 0)
return 0;
else