diff options
Diffstat (limited to 'src/scalarproduct/gnunet-service-scalarproduct_alice.c')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct_alice.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c index 76aee54e3..5478a85a7 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c | |||
@@ -413,7 +413,7 @@ transmit_client_response (struct AliceServiceSession *s) | |||
413 | msg->product_length = htonl (product_length); | 413 | msg->product_length = htonl (product_length); |
414 | if (NULL != product_exported) | 414 | if (NULL != product_exported) |
415 | { | 415 | { |
416 | memcpy (&msg[1], | 416 | GNUNET_memcpy (&msg[1], |
417 | product_exported, | 417 | product_exported, |
418 | product_length); | 418 | product_length); |
419 | GNUNET_free (product_exported); | 419 | GNUNET_free (product_exported); |
@@ -692,10 +692,10 @@ handle_bobs_cryptodata_multipart (void *cls, | |||
692 | /* Convert each k[][perm] to its MPI_value */ | 692 | /* Convert each k[][perm] to its MPI_value */ |
693 | for (i = 0; i < contained; i++) | 693 | for (i = 0; i < contained; i++) |
694 | { | 694 | { |
695 | memcpy (&s->r[s->cadet_received_element_count + i], | 695 | GNUNET_memcpy (&s->r[s->cadet_received_element_count + i], |
696 | &payload[2 * i], | 696 | &payload[2 * i], |
697 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 697 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
698 | memcpy (&s->r_prime[s->cadet_received_element_count + i], | 698 | GNUNET_memcpy (&s->r_prime[s->cadet_received_element_count + i], |
699 | &payload[2 * i], | 699 | &payload[2 * i], |
700 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 700 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
701 | } | 701 | } |
@@ -775,10 +775,10 @@ handle_bobs_cryptodata_message (void *cls, | |||
775 | (unsigned int) contained); | 775 | (unsigned int) contained); |
776 | 776 | ||
777 | payload = (const struct GNUNET_CRYPTO_PaillierCiphertext *) &msg[1]; | 777 | payload = (const struct GNUNET_CRYPTO_PaillierCiphertext *) &msg[1]; |
778 | memcpy (&s->s, | 778 | GNUNET_memcpy (&s->s, |
779 | &payload[0], | 779 | &payload[0], |
780 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 780 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
781 | memcpy (&s->s_prime, | 781 | GNUNET_memcpy (&s->s_prime, |
782 | &payload[1], | 782 | &payload[1], |
783 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 783 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
784 | payload = &payload[2]; | 784 | payload = &payload[2]; |
@@ -787,10 +787,10 @@ handle_bobs_cryptodata_message (void *cls, | |||
787 | s->r_prime = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) * s->used_element_count); | 787 | s->r_prime = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) * s->used_element_count); |
788 | for (i = 0; i < contained; i++) | 788 | for (i = 0; i < contained; i++) |
789 | { | 789 | { |
790 | memcpy (&s->r[i], | 790 | GNUNET_memcpy (&s->r[i], |
791 | &payload[2 * i], | 791 | &payload[2 * i], |
792 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 792 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
793 | memcpy (&s->r_prime[i], | 793 | GNUNET_memcpy (&s->r_prime[i], |
794 | &payload[2 * i + 1], | 794 | &payload[2 * i + 1], |
795 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 795 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
796 | } | 796 | } |
@@ -1173,7 +1173,7 @@ GSS_handle_alice_client_message_multipart (void *cls, | |||
1173 | for (i = 0; i < contained_count; i++) | 1173 | for (i = 0; i < contained_count; i++) |
1174 | { | 1174 | { |
1175 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); | 1175 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); |
1176 | memcpy (elem, | 1176 | GNUNET_memcpy (elem, |
1177 | &elements[i], | 1177 | &elements[i], |
1178 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); | 1178 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); |
1179 | if (GNUNET_SYSERR == | 1179 | if (GNUNET_SYSERR == |
@@ -1276,7 +1276,7 @@ GSS_handle_alice_client_message (void *cls, | |||
1276 | if (0 == GNUNET_ntohll (elements[i].value)) | 1276 | if (0 == GNUNET_ntohll (elements[i].value)) |
1277 | continue; | 1277 | continue; |
1278 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); | 1278 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); |
1279 | memcpy (elem, | 1279 | GNUNET_memcpy (elem, |
1280 | &elements[i], | 1280 | &elements[i], |
1281 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); | 1281 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); |
1282 | if (GNUNET_SYSERR == | 1282 | if (GNUNET_SYSERR == |