mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
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:
@ -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 );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user