From: Dr. Stephen Henson Date: Mon, 15 Sep 2008 22:03:18 +0000 (+0000) Subject: Update from stable branch. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f97b8f3114dcd2dc5a4883f0824b53d2bcef1390;p=oweals%2Fopenssl.git Update from stable branch. --- diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 304ce7ea68..30e0ca4d9f 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -143,7 +143,12 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, { int i,j,bl; - OPENSSL_assert(inl > 0); + if (inl <= 0) + { + *outl = 0; + return inl == 0; + } + if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0) { if(M_do_cipher(ctx,out,in,inl)) @@ -245,10 +250,10 @@ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, int fix_len; unsigned int b; - if (inl == 0) + if (inl <= 0) { - *outl=0; - return 1; + *outl = 0; + return inl == 0; } if (ctx->flags & EVP_CIPH_NO_PADDING)