From b54371bd5ca3d86e7e8383149975fdc31b14d0a7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 14 Feb 2019 11:03:56 +0100 Subject: [PATCH] fix #3329 --- src/secretsharing/gnunet-service-secretsharing.c | 11 ++++++++--- src/secretsharing/secretsharing.conf.in | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/secretsharing/gnunet-service-secretsharing.c b/src/secretsharing/gnunet-service-secretsharing.c index 011e79b27..842d714f3 100644 --- a/src/secretsharing/gnunet-service-secretsharing.c +++ b/src/secretsharing/gnunet-service-secretsharing.c @@ -898,7 +898,9 @@ restore_fair (const struct GNUNET_CRYPTO_PaillierPublicKey *ppub, GNUNET_assert (NULL != (big_b = gcry_mpi_new (0))); // a = (N,0)^T - GNUNET_CRYPTO_mpi_scan_unsigned (&a_1, ppub, sizeof (struct GNUNET_CRYPTO_PaillierPublicKey)); + GNUNET_CRYPTO_mpi_scan_unsigned (&a_1, + ppub, + sizeof (struct GNUNET_CRYPTO_PaillierPublicKey)); GNUNET_assert (NULL != (a_2 = gcry_mpi_new (0))); gcry_mpi_set_ui (a_2, 0); // b = (x,1)^T @@ -960,11 +962,14 @@ restore_fair (const struct GNUNET_CRYPTO_PaillierPublicKey *ppub, { gcry_mpi_t paillier_n; - GNUNET_CRYPTO_mpi_scan_unsigned (&paillier_n, ppub, sizeof (struct GNUNET_CRYPTO_PaillierPublicKey)); - + GNUNET_CRYPTO_mpi_scan_unsigned (&paillier_n, + ppub, + sizeof (struct GNUNET_CRYPTO_PaillierPublicKey)); + /* FIXME: why get pallier_n here if we never use it? */ gcry_mpi_set (xres, b_2); gcry_mpi_invm (xres, xres, elgamal_q); gcry_mpi_mulm (xres, xres, b_1, elgamal_q); + gcry_mpi_release (paillier_n); } gcry_mpi_release (a_1); diff --git a/src/secretsharing/secretsharing.conf.in b/src/secretsharing/secretsharing.conf.in index ddc41b978..df8566abd 100644 --- a/src/secretsharing/secretsharing.conf.in +++ b/src/secretsharing/secretsharing.conf.in @@ -8,7 +8,7 @@ ACCEPT_FROM6 = ::1; UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-secretsharing.sock UNIX_MATCH_UID = YES UNIX_MATCH_GID = YES -PREFIX = valgrind --leak-check=yes +# PREFIX = valgrind --leak-check=yes # DISABLE_SOCKET_FORWARDING = NO # USERNAME = # MAXBUF = -- 2.25.1