tls: psa_pake: add a check on read size on both rounds
@@ -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 );
}
