Remove superfluous check

mac size is previously checked to not be less than 4, so it can't be zero
anymore at this point.

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
Steven Cooreman 2021-03-08 12:01:55 +01:00
parent cd64093222
commit 1fb691aea9

View file

@ -3022,8 +3022,7 @@ static psa_status_t psa_mac_setup( psa_mac_operation_t *operation,
if( PSA_ALG_IS_HMAC( alg ) )
{
/* Sanity check. This shouldn't fail on a valid configuration. */
if( operation->mac_size == 0 ||
operation->mac_size > sizeof( operation->ctx.hmac.opad ) )
if( operation->mac_size > sizeof( operation->ctx.hmac.opad ) )
{
status = PSA_ERROR_NOT_SUPPORTED;
goto exit;