-fix computation
authorChristian Grothoff <christian@grothoff.org>
Sat, 5 Sep 2015 18:52:35 +0000 (18:52 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 5 Sep 2015 18:52:35 +0000 (18:52 +0000)
src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c

index 773682234ab1cd2d0f2078b9e8e6d9414da19953..4bb67c10ae24594239ded024998b6412f53a513b 100644 (file)
@@ -469,6 +469,8 @@ compute_scalar_product (struct AliceServiceSession *session,
   if (MAX_RESULT == ai_bi)
   {
     /* result too big */
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Scalar product result out of range\n");
     return NULL;
   }
   ret = gcry_mpi_new (0);
index 80a0dc9414847903a84096587ea8c28e2d6bb630..7e2fc0bbf0c7c9cf708c1a8887d5791ab1d759e6 100644 (file)
@@ -646,7 +646,7 @@ handle_alices_cryptodata_message (void *cls,
      an upper bound on the required array size */
   max = GNUNET_CONTAINER_multihashmap_size (s->intersected_elements);
   msg_length = sizeof (struct EccAliceCryptodataMessage)
-    + contained_elements * sizeof (struct GNUNET_CRYPTO_EccPoint);
+    + contained_elements * sizeof (struct GNUNET_CRYPTO_EccPoint) * 2;
   if ( (msize != msg_length) ||
        (0 == contained_elements) ||
        (contained_elements > UINT16_MAX) ||