[PATCH openEuler-5.10-LTS 128/141] mpi: Fix length check in mpi_key_length()