diff options
author | Werner Koch <wk@gnupg.org> | 2018-10-23 22:58:09 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-10-23 22:58:09 +0200 |
commit | e2da4e8dee4b371804f3b2659b53431fb6380d93 (patch) | |
tree | 0d23b5bfafbd41b773b808f247bbc37f59e83629 /cipher/ecc-curves.c | |
parent | 9f2c7ec4d8b07e82663ad084c90c016d3c3b80c2 (diff) | |
download | libgcrypt-e2da4e8dee4b371804f3b2659b53431fb6380d93.tar.gz |
ecc: Fix potential unintended freeing of an internal param.
* cipher/ecc-curves.c (_gcry_ecc_get_mpi): Fix c+p error
--
GnuPG-bug-id: 4208
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/ecc-curves.c')
-rw-r--r-- | cipher/ecc-curves.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c index 86d0b4e6..75d7161b 100644 --- a/cipher/ecc-curves.c +++ b/cipher/ecc-curves.c @@ -1206,7 +1206,7 @@ _gcry_ecc_get_mpi (const char *name, mpi_ec_t ec, int copy) if (!strcmp (name, "q.x") && ec->Q && ec->Q->x) return mpi_is_const (ec->Q->x) && !copy? ec->Q->x : mpi_copy (ec->Q->x); if (!strcmp (name, "q.y") && ec->Q && ec->Q->y) - return mpi_is_const (ec->G->y) && !copy? ec->Q->y : mpi_copy (ec->Q->y); + return mpi_is_const (ec->Q->y) && !copy? ec->Q->y : mpi_copy (ec->Q->y); /* If the base point has been requested, return it in standard encoding. */ |