tls: psa_pake: add a check on read size on both rounds

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
Valerio Setti 2022-11-17 16:23:34 +01:00
parent a988364767
commit 30ebe11f86

View file

@ -8231,6 +8231,9 @@ int mbedtls_psa_ecjpake_read_round_one(
}
}
if ( input_offset != len )
return PSA_ERROR_INVALID_ARGUMENT;
return( 0 );
}
@ -8286,6 +8289,9 @@ int mbedtls_psa_ecjpake_read_round_two(
input_offset += length;
}
if ( input_offset != len )
return PSA_ERROR_INVALID_ARGUMENT;
return( 0 );
}