From c7362450c679736ceb82e95fac2e251972f3ea1e Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Mon, 15 Apr 2013 11:11:58 +0200
Subject: [PATCH] Fix addition of EC points.

* mpi/ec.c (_gcry_mpi_ec_add_points): Fix case of P1 given in affine
coordinates.
--

This was a plain copy and paste error, which was found due to explicit
use of affine coordinates by GNUnet's new pseudonyms code.

Signed-off-by: Werner Koch <wk@gnupg.org>
---
 mpi/ec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mpi/ec.c b/mpi/ec.c
index e325358..ce86e09 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -522,7 +522,7 @@ _gcry_mpi_ec_add_points (mpi_point_t *result,
           ec_mulm (l1, l1, x1, ctx);
         }
       if (z1_is_one)
-        mpi_set (l2, x1);
+        mpi_set (l2, x2);
       else
         {
           ec_powm (l2, z1, ctx->two, ctx);
-- 
2.7.0

