diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2021-05-06 12:35:19 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2021-05-06 12:35:19 +0900 |
commit | bd662c090bd4a45cc830de9e42e96dd0f8e1f702 (patch) | |
tree | 616c58df49bfeb7f99858214a77c4e7a78f66960 | |
parent | 3f48e3ea37adf84aae7335b8367012d70bb3f132 (diff) | |
download | libgcrypt-bd662c090bd4a45cc830de9e42e96dd0f8e1f702.tar.gz |
ecc: Fix the previous commit.
* cipher/ecc-misc.c (_gcry_ecc_mont_decodepoint): Fix the condition.
--
GnuPG-bug-id: 5423
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r-- | cipher/ecc-misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/ecc-misc.c b/cipher/ecc-misc.c index b89dcfa6..0c387c27 100644 --- a/cipher/ecc-misc.c +++ b/cipher/ecc-misc.c @@ -331,7 +331,7 @@ _gcry_ecc_mont_decodepoint (gcry_mpi_t pk, mpi_ec_t ctx, mpi_point_t result) rawmpi = _gcry_mpi_get_buffer (pk, nbytes, &rawmpilen, NULL); if (!rawmpi) return gpg_err_code_from_syserror (); - if (rawmpilen > nbytes + 1) + if (rawmpilen > nbytes + BYTES_PER_MPI_LIMB) { xfree (rawmpi); return GPG_ERR_INV_OBJ; |