mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 07:54:27 +01:00
Place olen initalization after reference check in cipher_update()
This commit is contained in:
parent
6f0636a09f
commit
6c21276342
@ -241,13 +241,13 @@ int cipher_update( cipher_context_t *ctx, const unsigned char *input, size_t ile
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
*olen = 0;
|
|
||||||
|
|
||||||
if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen )
|
if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen )
|
||||||
{
|
{
|
||||||
return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA;
|
return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*olen = 0;
|
||||||
|
|
||||||
if( ctx->cipher_info->mode == POLARSSL_MODE_ECB )
|
if( ctx->cipher_info->mode == POLARSSL_MODE_ECB )
|
||||||
{
|
{
|
||||||
if( ilen != cipher_get_block_size( ctx ) )
|
if( ilen != cipher_get_block_size( ctx ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user