Place olen initalization after reference check in cipher_update()
This commit is contained in:
parent
6f0636a09f
commit
6c21276342
1 changed files with 2 additions and 2 deletions
|
@ -241,13 +241,13 @@ int cipher_update( cipher_context_t *ctx, const unsigned char *input, size_t ile
|
|||
{
|
||||
int ret;
|
||||
|
||||
*olen = 0;
|
||||
|
||||
if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen )
|
||||
{
|
||||
return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
*olen = 0;
|
||||
|
||||
if( ctx->cipher_info->mode == POLARSSL_MODE_ECB )
|
||||
{
|
||||
if( ilen != cipher_get_block_size( ctx ) )
|
||||
|
|
Loading…
Reference in a new issue