mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00: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:
parent
a988364767
commit
30ebe11f86
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user