Oops, restore change that got reverted accidentally.
This commit is contained in:
parent
3fa1a444ce
commit
f947b818bf
1 changed files with 9 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue