aboutsummaryrefslogtreecommitdiff
path: root/src/social
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
commitd8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch)
tree0ebb0db416c157fcfde51a941185819dd12d51fd /src/social
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
downloadgnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz
gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/social')
-rw-r--r--src/social/gnunet-service-social.c36
-rw-r--r--src/social/gnunet-social.c2
-rw-r--r--src/social/social_api.c50
-rw-r--r--src/social/test_social.c2
4 files changed, 45 insertions, 45 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c
index 6c57fed31..287047f58 100644
--- a/src/social/gnunet-service-social.c
+++ b/src/social/gnunet-service-social.c
@@ -660,7 +660,7 @@ client_send_result (struct GNUNET_SERVER_Client *client, uint64_t op_id,
660 res->result_code = GNUNET_htonll (result_code); 660 res->result_code = GNUNET_htonll (result_code);
661 res->op_id = op_id; 661 res->op_id = op_id;
662 if (0 < data_size) 662 if (0 < data_size)
663 memcpy (&res[1], data, data_size); 663 GNUNET_memcpy (&res[1], data, data_size);
664 664
665 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 665 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
666 "%p Sending result to client for operation #%" PRIu64 ": " 666 "%p Sending result to client for operation #%" PRIu64 ": "
@@ -1166,7 +1166,7 @@ app_place_add (const char *app_id,
1166 1166
1167 size_t app_id_size = strlen (app_id) + 1; 1167 size_t app_id_size = strlen (app_id) + 1;
1168 void *app_id_value = GNUNET_malloc (app_id_size); 1168 void *app_id_value = GNUNET_malloc (app_id_size);
1169 memcpy (app_id_value, app_id, app_id_size); 1169 GNUNET_memcpy (app_id_value, app_id, app_id_size);
1170 1170
1171 if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (place_apps, &app_id_hash, app_id_value, 1171 if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (place_apps, &app_id_hash, app_id_value,
1172 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) 1172 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
@@ -1630,7 +1630,7 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst)
1630 if (0 < relay_size) 1630 if (0 < relay_size)
1631 { 1631 {
1632 gst->relays = GNUNET_malloc (relay_size); 1632 gst->relays = GNUNET_malloc (relay_size);
1633 memcpy (gst->relays, relays, relay_size); 1633 GNUNET_memcpy (gst->relays, relays, relay_size);
1634 } 1634 }
1635 1635
1636 gst->join_flags = ntohl (greq->flags); 1636 gst->join_flags = ntohl (greq->flags);
@@ -1805,11 +1805,11 @@ gns_result_guest_enter (void *cls, uint32_t rd_count,
1805 greq->relay_count = rec->relay_count; 1805 greq->relay_count = rec->relay_count;
1806 1806
1807 void *p = &greq[1]; 1807 void *p = &greq[1];
1808 memcpy (p, gcls->app_id, app_id_size); 1808 GNUNET_memcpy (p, gcls->app_id, app_id_size);
1809 p += app_id_size; 1809 p += app_id_size;
1810 memcpy (p, relays, relay_size); 1810 GNUNET_memcpy (p, relays, relay_size);
1811 p += relay_size; 1811 p += relay_size;
1812 memcpy (p, gcls->join_msg, join_msg_size); 1812 GNUNET_memcpy (p, gcls->join_msg, join_msg_size);
1813 1813
1814 client_recv_guest_enter (NULL, gcls->client, &greq->header); 1814 client_recv_guest_enter (NULL, gcls->client, &greq->header);
1815 1815
@@ -1867,13 +1867,13 @@ client_recv_guest_enter_by_name (void *cls, struct GNUNET_SERVER_Client *client,
1867 1867
1868 uint16_t app_id_size = strlen (app_id) + 1; 1868 uint16_t app_id_size = strlen (app_id) + 1;
1869 gcls->app_id = GNUNET_malloc (app_id_size); 1869 gcls->app_id = GNUNET_malloc (app_id_size);
1870 memcpy (gcls->app_id, app_id, app_id_size); 1870 GNUNET_memcpy (gcls->app_id, app_id, app_id_size);
1871 1871
1872 uint16_t password_size = strlen (password); 1872 uint16_t password_size = strlen (password);
1873 if (0 < password_size++) 1873 if (0 < password_size++)
1874 { 1874 {
1875 gcls->password = GNUNET_malloc (password_size); 1875 gcls->password = GNUNET_malloc (password_size);
1876 memcpy (gcls->password, password, password_size); 1876 GNUNET_memcpy (gcls->password, password, password_size);
1877 } 1877 }
1878 1878
1879 GNUNET_GNS_lookup (gns, gns_name, &greq->ego_pub_key, 1879 GNUNET_GNS_lookup (gns, gns_name, &greq->ego_pub_key,
@@ -1953,7 +1953,7 @@ app_notify_ego (struct Ego *ego, struct GNUNET_SERVER_Client *client)
1953 emsg->header.size = htons (sizeof (*emsg) + name_size); 1953 emsg->header.size = htons (sizeof (*emsg) + name_size);
1954 1954
1955 GNUNET_CRYPTO_ecdsa_key_get_public (&ego->key, &emsg->ego_pub_key); 1955 GNUNET_CRYPTO_ecdsa_key_get_public (&ego->key, &emsg->ego_pub_key);
1956 memcpy (&emsg[1], ego->name, name_size); 1956 GNUNET_memcpy (&emsg[1], ego->name, name_size);
1957 1957
1958 client_send_msg (client, &emsg->header); 1958 client_send_msg (client, &emsg->header);
1959 GNUNET_free (emsg); 1959 GNUNET_free (emsg);
@@ -2043,7 +2043,7 @@ client_recv_app_connect (void *cls, struct GNUNET_SERVER_Client *client,
2043 2043
2044 struct Client *ctx = GNUNET_new (struct Client); 2044 struct Client *ctx = GNUNET_new (struct Client);
2045 ctx->app_id = GNUNET_malloc (app_id_size); 2045 ctx->app_id = GNUNET_malloc (app_id_size);
2046 memcpy (ctx->app_id, app_id, app_id_size); 2046 GNUNET_memcpy (ctx->app_id, app_id, app_id_size);
2047 2047
2048 GNUNET_SERVER_client_set_user_context (client, ctx); 2048 GNUNET_SERVER_client_set_user_context (client, ctx);
2049 GNUNET_SERVER_receive_done (client, GNUNET_OK); 2049 GNUNET_SERVER_receive_done (client, GNUNET_OK);
@@ -2319,7 +2319,7 @@ psyc_transmit_notify_data (void *cls, uint16_t *data_size, void *data)
2319 plc, pdata_size); 2319 plc, pdata_size);
2320 2320
2321 *data_size = pdata_size; 2321 *data_size = pdata_size;
2322 memcpy (data, &pmsg[1], *data_size); 2322 GNUNET_memcpy (data, &pmsg[1], *data_size);
2323 ret = GNUNET_NO; 2323 ret = GNUNET_NO;
2324 break; 2324 break;
2325 2325
@@ -2454,7 +2454,7 @@ psyc_transmit_notify_mod (void *cls, uint16_t *data_size, void *data,
2454 *full_value_size = ntohl (pmod->value_size); 2454 *full_value_size = ntohl (pmod->value_size);
2455 *oper = pmod->oper; 2455 *oper = pmod->oper;
2456 *data_size = mod_size; 2456 *data_size = mod_size;
2457 memcpy (data, &pmod[1], mod_size); 2457 GNUNET_memcpy (data, &pmod[1], mod_size);
2458 ret = GNUNET_NO; 2458 ret = GNUNET_NO;
2459 break; 2459 break;
2460 } 2460 }
@@ -2480,7 +2480,7 @@ psyc_transmit_notify_mod (void *cls, uint16_t *data_size, void *data,
2480 "%p psyc_transmit_notify_mod: sending %u bytes.\n", plc, mod_size); 2480 "%p psyc_transmit_notify_mod: sending %u bytes.\n", plc, mod_size);
2481 2481
2482 *data_size = mod_size; 2482 *data_size = mod_size;
2483 memcpy (data, &pmsg[1], *data_size); 2483 GNUNET_memcpy (data, &pmsg[1], *data_size);
2484 ret = GNUNET_NO; 2484 ret = GNUNET_NO;
2485 break; 2485 break;
2486 } 2486 }
@@ -2760,7 +2760,7 @@ psyc_transmit_queue_message (struct Place *plc,
2760 2760
2761 struct FragmentTransmitQueue * 2761 struct FragmentTransmitQueue *
2762 tmit_frag = GNUNET_malloc (sizeof (*tmit_frag) + data_size); 2762 tmit_frag = GNUNET_malloc (sizeof (*tmit_frag) + data_size);
2763 memcpy (&tmit_frag[1], data, data_size); 2763 GNUNET_memcpy (&tmit_frag[1], data, data_size);
2764 tmit_frag->next_part = (struct GNUNET_MessageHeader *) &tmit_frag[1]; 2764 tmit_frag->next_part = (struct GNUNET_MessageHeader *) &tmit_frag[1];
2765 tmit_frag->client = client; 2765 tmit_frag->client = client;
2766 tmit_frag->size = data_size; 2766 tmit_frag->size = data_size;
@@ -2893,7 +2893,7 @@ psyc_recv_history_message (void *cls, const struct GNUNET_PSYC_MessageHeader *ms
2893 res->op_id = opcls->op_id; 2893 res->op_id = opcls->op_id;
2894 res->result_code = GNUNET_htonll (GNUNET_OK); 2894 res->result_code = GNUNET_htonll (GNUNET_OK);
2895 2895
2896 memcpy (&res[1], msg, size); 2896 GNUNET_memcpy (&res[1], msg, size);
2897 2897
2898 /** @todo FIXME: send only to requesting client */ 2898 /** @todo FIXME: send only to requesting client */
2899 place_send_msg (plc, &res->header); 2899 place_send_msg (plc, &res->header);
@@ -3001,7 +3001,7 @@ psyc_recv_state_var (void *cls,
3001 res->op_id = opcls->op_id; 3001 res->op_id = opcls->op_id;
3002 res->result_code = GNUNET_htonll (GNUNET_OK); 3002 res->result_code = GNUNET_htonll (GNUNET_OK);
3003 3003
3004 memcpy (&res[1], mod, size); 3004 GNUNET_memcpy (&res[1], mod, size);
3005 3005
3006 /** @todo FIXME: send only to requesting client */ 3006 /** @todo FIXME: send only to requesting client */
3007 place_send_msg (plc, &res->header); 3007 place_send_msg (plc, &res->header);
@@ -3139,7 +3139,7 @@ client_recv_zone_add_place (void *cls, struct GNUNET_SERVER_Client *client,
3139 rec->place_pub_key = preq->place_pub_key; 3139 rec->place_pub_key = preq->place_pub_key;
3140 rec->origin = this_peer; 3140 rec->origin = this_peer;
3141 rec->relay_count = preq->relay_count; 3141 rec->relay_count = preq->relay_count;
3142 memcpy (&rec[1], relays, relay_size); 3142 GNUNET_memcpy (&rec[1], relays, relay_size);
3143 3143
3144 rd.data = rec; 3144 rd.data = rec;
3145 rd.data_size = sizeof (*rec) + relay_size; 3145 rd.data_size = sizeof (*rec) + relay_size;
@@ -3439,7 +3439,7 @@ identity_recv_ego (void *cls, struct GNUNET_IDENTITY_Ego *id_ego,
3439 ego->key = *(GNUNET_IDENTITY_ego_get_private_key (id_ego)); 3439 ego->key = *(GNUNET_IDENTITY_ego_get_private_key (id_ego));
3440 size_t name_size = strlen (name) + 1; 3440 size_t name_size = strlen (name) + 1;
3441 ego->name = GNUNET_malloc (name_size); 3441 ego->name = GNUNET_malloc (name_size);
3442 memcpy (ego->name, name, name_size); 3442 GNUNET_memcpy (ego->name, name, name_size);
3443 3443
3444 GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego, 3444 GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego,
3445 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE); 3445 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE);
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c
index 7c36a96d4..ed3801abc 100644
--- a/src/social/gnunet-social.c
+++ b/src/social/gnunet-social.c
@@ -349,7 +349,7 @@ notify_data (void *cls, uint16_t *data_size, void *data)
349 struct TransmitClosure *tmit = cls; 349 struct TransmitClosure *tmit = cls;
350 uint16_t size = tmit->size < *data_size ? tmit->size : *data_size; 350 uint16_t size = tmit->size < *data_size ? tmit->size : *data_size;
351 *data_size = size; 351 *data_size = size;
352 memcpy (data, tmit->data, size); 352 GNUNET_memcpy (data, tmit->data, size);
353 353
354 tmit->size -= size; 354 tmit->size -= size;
355 tmit->data += size; 355 tmit->data += size;
diff --git a/src/social/social_api.c b/src/social/social_api.c
index 5f144b88a..926995f6b 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -489,7 +489,7 @@ app_send_connect_msg (struct GNUNET_SOCIAL_App *app)
489{ 489{
490 uint16_t cmsg_size = ntohs (app->connect_msg->size); 490 uint16_t cmsg_size = ntohs (app->connect_msg->size);
491 struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size); 491 struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size);
492 memcpy (cmsg, app->connect_msg, cmsg_size); 492 GNUNET_memcpy (cmsg, app->connect_msg, cmsg_size);
493 GNUNET_CLIENT_MANAGER_transmit_now (app->client, cmsg); 493 GNUNET_CLIENT_MANAGER_transmit_now (app->client, cmsg);
494 GNUNET_free (cmsg); 494 GNUNET_free (cmsg);
495} 495}
@@ -516,7 +516,7 @@ place_send_connect_msg (struct GNUNET_SOCIAL_Place *plc)
516{ 516{
517 uint16_t cmsg_size = ntohs (plc->connect_msg->size); 517 uint16_t cmsg_size = ntohs (plc->connect_msg->size);
518 struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size); 518 struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size);
519 memcpy (cmsg, plc->connect_msg, cmsg_size); 519 GNUNET_memcpy (cmsg, plc->connect_msg, cmsg_size);
520 GNUNET_CLIENT_MANAGER_transmit_now (plc->client, cmsg); 520 GNUNET_CLIENT_MANAGER_transmit_now (plc->client, cmsg);
521 GNUNET_free (cmsg); 521 GNUNET_free (cmsg);
522} 522}
@@ -718,7 +718,7 @@ place_recv_state_result (void *cls,
718 { 718 {
719 look->mod_value_remaining = look->mod_value_size; 719 look->mod_value_remaining = look->mod_value_size;
720 look->mod_name = GNUNET_malloc (name_size); 720 look->mod_name = GNUNET_malloc (name_size);
721 memcpy (look->mod_name, name, name_size); 721 GNUNET_memcpy (look->mod_name, name, name_size);
722 } 722 }
723 break; 723 break;
724 } 724 }
@@ -911,12 +911,12 @@ app_recv_ego (void *cls,
911 ego = GNUNET_malloc (sizeof (*ego)); 911 ego = GNUNET_malloc (sizeof (*ego));
912 ego->pub_key = emsg->ego_pub_key; 912 ego->pub_key = emsg->ego_pub_key;
913 ego->name = GNUNET_malloc (name_size); 913 ego->name = GNUNET_malloc (name_size);
914 memcpy (ego->name, &emsg[1], name_size); 914 GNUNET_memcpy (ego->name, &emsg[1], name_size);
915 } 915 }
916 else 916 else
917 { 917 {
918 ego->name = GNUNET_realloc (ego->name, name_size); 918 ego->name = GNUNET_realloc (ego->name, name_size);
919 memcpy (ego->name, &emsg[1], name_size); 919 GNUNET_memcpy (ego->name, &emsg[1], name_size);
920 } 920 }
921 921
922 GNUNET_CONTAINER_multihashmap_put (app->egos, &ego_pub_hash, ego, 922 GNUNET_CONTAINER_multihashmap_put (app->egos, &ego_pub_hash, ego,
@@ -1212,7 +1212,7 @@ GNUNET_SOCIAL_host_enter (const struct GNUNET_SOCIAL_App *app,
1212 hreq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER); 1212 hreq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER);
1213 hreq->policy = policy; 1213 hreq->policy = policy;
1214 hreq->ego_pub_key = ego->pub_key; 1214 hreq->ego_pub_key = ego->pub_key;
1215 memcpy (&hreq[1], app->id, app_id_size); 1215 GNUNET_memcpy (&hreq[1], app->id, app_id_size);
1216 1216
1217 plc->connect_msg = &hreq->header; 1217 plc->connect_msg = &hreq->header;
1218 place_send_connect_msg (plc); 1218 place_send_connect_msg (plc);
@@ -1280,7 +1280,7 @@ GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn,
1280 hreq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER); 1280 hreq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER);
1281 hreq->place_pub_key = hconn->plc_msg.place_pub_key; 1281 hreq->place_pub_key = hconn->plc_msg.place_pub_key;
1282 hreq->ego_pub_key = hconn->plc_msg.ego_pub_key; 1282 hreq->ego_pub_key = hconn->plc_msg.ego_pub_key;
1283 memcpy (&hreq[1], hconn->app->id, app_id_size); 1283 GNUNET_memcpy (&hreq[1], hconn->app->id, app_id_size);
1284 1284
1285 plc->connect_msg = &hreq->header; 1285 plc->connect_msg = &hreq->header;
1286 place_send_connect_msg (plc); 1286 place_send_connect_msg (plc);
@@ -1332,7 +1332,7 @@ GNUNET_SOCIAL_host_entry_decision (struct GNUNET_SOCIAL_Host *hst,
1332 dcsn->slave_pub_key = nym->pub_key; 1332 dcsn->slave_pub_key = nym->pub_key;
1333 1333
1334 if (0 < entry_resp_size) 1334 if (0 < entry_resp_size)
1335 memcpy (&dcsn[1], entry_resp, entry_resp_size); 1335 GNUNET_memcpy (&dcsn[1], entry_resp, entry_resp_size);
1336 1336
1337 GNUNET_CLIENT_MANAGER_transmit (hst->plc.client, &dcsn->header); 1337 GNUNET_CLIENT_MANAGER_transmit (hst->plc.client, &dcsn->header);
1338 GNUNET_free (dcsn); 1338 GNUNET_free (dcsn);
@@ -1621,16 +1621,16 @@ guest_enter_request_create (const char *app_id,
1621 greq->relay_count = htonl (relay_count); 1621 greq->relay_count = htonl (relay_count);
1622 1622
1623 char *p = (char *) &greq[1]; 1623 char *p = (char *) &greq[1];
1624 memcpy (p, app_id, app_id_size); 1624 GNUNET_memcpy (p, app_id, app_id_size);
1625 p += app_id_size; 1625 p += app_id_size;
1626 1626
1627 if (0 < relay_size) 1627 if (0 < relay_size)
1628 { 1628 {
1629 memcpy (p, relays, relay_size); 1629 GNUNET_memcpy (p, relays, relay_size);
1630 p += relay_size; 1630 p += relay_size;
1631 } 1631 }
1632 1632
1633 memcpy (p, join_msg, join_msg_size); 1633 GNUNET_memcpy (p, join_msg, join_msg_size);
1634 return greq; 1634 return greq;
1635} 1635}
1636 1636
@@ -1765,14 +1765,14 @@ GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_SOCIAL_App *app,
1765 greq->ego_pub_key = ego->pub_key; 1765 greq->ego_pub_key = ego->pub_key;
1766 1766
1767 char *p = (char *) &greq[1]; 1767 char *p = (char *) &greq[1];
1768 memcpy (p, app->id, app_id_size); 1768 GNUNET_memcpy (p, app->id, app_id_size);
1769 p += app_id_size; 1769 p += app_id_size;
1770 memcpy (p, gns_name, gns_name_size); 1770 GNUNET_memcpy (p, gns_name, gns_name_size);
1771 p += gns_name_size; 1771 p += gns_name_size;
1772 memcpy (p, password, password_size); 1772 GNUNET_memcpy (p, password, password_size);
1773 p += password_size; 1773 p += password_size;
1774 if (NULL != join_msg) 1774 if (NULL != join_msg)
1775 memcpy (p, join_msg, join_msg_size); 1775 GNUNET_memcpy (p, join_msg, join_msg_size);
1776 1776
1777 gst->enter_cb = local_enter_cb; 1777 gst->enter_cb = local_enter_cb;
1778 gst->entry_dcsn_cb = entry_decision_cb; 1778 gst->entry_dcsn_cb = entry_decision_cb;
@@ -1831,7 +1831,7 @@ GNUNET_SOCIAL_guest_enter_reconnect (struct GNUNET_SOCIAL_GuestConnection *gconn
1831 greq->place_pub_key = gconn->plc_msg.place_pub_key; 1831 greq->place_pub_key = gconn->plc_msg.place_pub_key;
1832 greq->flags = htonl (flags); 1832 greq->flags = htonl (flags);
1833 1833
1834 memcpy (&greq[1], gconn->app->id, app_id_size); 1834 GNUNET_memcpy (&greq[1], gconn->app->id, app_id_size);
1835 1835
1836 gst->enter_cb = local_enter_cb; 1836 gst->enter_cb = local_enter_cb;
1837 gst->cb_cls = cls; 1837 gst->cb_cls = cls;
@@ -2023,7 +2023,7 @@ GNUNET_SOCIAL_place_msg_proc_set (struct GNUNET_SOCIAL_Place *plc,
2023 mpreq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET); 2023 mpreq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET);
2024 mpreq->header.size = htons (sizeof (*mpreq) + method_size); 2024 mpreq->header.size = htons (sizeof (*mpreq) + method_size);
2025 mpreq->flags = htonl (flags); 2025 mpreq->flags = htonl (flags);
2026 memcpy (&mpreq[1], method_prefix, method_size); 2026 GNUNET_memcpy (&mpreq[1], method_prefix, method_size);
2027 2027
2028 GNUNET_CLIENT_MANAGER_transmit (plc->client, &mpreq->header); 2028 GNUNET_CLIENT_MANAGER_transmit (plc->client, &mpreq->header);
2029 GNUNET_free (mpreq); 2029 GNUNET_free (mpreq);
@@ -2076,7 +2076,7 @@ place_history_replay (struct GNUNET_SOCIAL_Place *plc,
2076 req->message_limit = GNUNET_htonll (message_limit); 2076 req->message_limit = GNUNET_htonll (message_limit);
2077 req->flags = htonl (flags); 2077 req->flags = htonl (flags);
2078 req->op_id = GNUNET_htonll (hist->op_id); 2078 req->op_id = GNUNET_htonll (hist->op_id);
2079 memcpy (&req[1], method_prefix, method_size); 2079 GNUNET_memcpy (&req[1], method_prefix, method_size);
2080 2080
2081 GNUNET_CLIENT_MANAGER_transmit (plc->client, &req->header); 2081 GNUNET_CLIENT_MANAGER_transmit (plc->client, &req->header);
2082 GNUNET_free (req); 2082 GNUNET_free (req);
@@ -2198,7 +2198,7 @@ place_state_get (struct GNUNET_SOCIAL_Place *plc,
2198 req->header.type = htons (type); 2198 req->header.type = htons (type);
2199 req->header.size = htons (sizeof (*req) + name_size); 2199 req->header.size = htons (sizeof (*req) + name_size);
2200 req->op_id = GNUNET_htonll (look->op_id); 2200 req->op_id = GNUNET_htonll (look->op_id);
2201 memcpy (&req[1], name, name_size); 2201 GNUNET_memcpy (&req[1], name, name_size);
2202 2202
2203 GNUNET_CLIENT_MANAGER_transmit (plc->client, &req->header); 2203 GNUNET_CLIENT_MANAGER_transmit (plc->client, &req->header);
2204 GNUNET_free (req); 2204 GNUNET_free (req);
@@ -2349,11 +2349,11 @@ GNUNET_SOCIAL_zone_add_place (const struct GNUNET_SOCIAL_App *app,
2349 preq->relay_count = htonl (relay_count); 2349 preq->relay_count = htonl (relay_count);
2350 2350
2351 char *p = (char *) &preq[1]; 2351 char *p = (char *) &preq[1];
2352 memcpy (p, name, name_size); 2352 GNUNET_memcpy (p, name, name_size);
2353 p += name_size; 2353 p += name_size;
2354 memcpy (p, password, password_size); 2354 GNUNET_memcpy (p, password, password_size);
2355 p += password_size; 2355 p += password_size;
2356 memcpy (p, relays, relay_size); 2356 GNUNET_memcpy (p, relays, relay_size);
2357 2357
2358 struct ZoneAddPlaceHandle * add_plc = GNUNET_malloc (sizeof (*add_plc)); 2358 struct ZoneAddPlaceHandle * add_plc = GNUNET_malloc (sizeof (*add_plc));
2359 add_plc->req = preq; 2359 add_plc->req = preq;
@@ -2426,7 +2426,7 @@ GNUNET_SOCIAL_zone_add_nym (const struct GNUNET_SOCIAL_App *app,
2426 nreq->expiration_time = GNUNET_htonll (expiration_time.abs_value_us); 2426 nreq->expiration_time = GNUNET_htonll (expiration_time.abs_value_us);
2427 nreq->ego_pub_key = ego->pub_key; 2427 nreq->ego_pub_key = ego->pub_key;
2428 nreq->nym_pub_key = *nym_pub_key; 2428 nreq->nym_pub_key = *nym_pub_key;
2429 memcpy (&nreq[1], name, name_size); 2429 GNUNET_memcpy (&nreq[1], name, name_size);
2430 2430
2431 struct ZoneAddNymHandle * add_nym = GNUNET_malloc (sizeof (*add_nym)); 2431 struct ZoneAddNymHandle * add_nym = GNUNET_malloc (sizeof (*add_nym));
2432 add_nym->req = nreq; 2432 add_nym->req = nreq;
@@ -2488,12 +2488,12 @@ GNUNET_SOCIAL_app_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
2488 GNUNET_CLIENT_MANAGER_set_user_context_ (app->client, app, sizeof (*app)); 2488 GNUNET_CLIENT_MANAGER_set_user_context_ (app->client, app, sizeof (*app));
2489 2489
2490 app->id = GNUNET_malloc (app_id_size); 2490 app->id = GNUNET_malloc (app_id_size);
2491 memcpy (app->id, id, app_id_size); 2491 GNUNET_memcpy (app->id, id, app_id_size);
2492 2492
2493 struct AppConnectRequest *creq = GNUNET_malloc (sizeof (*creq) + app_id_size); 2493 struct AppConnectRequest *creq = GNUNET_malloc (sizeof (*creq) + app_id_size);
2494 creq->header.size = htons (sizeof (*creq) + app_id_size); 2494 creq->header.size = htons (sizeof (*creq) + app_id_size);
2495 creq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT); 2495 creq->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT);
2496 memcpy (&creq[1], app->id, app_id_size); 2496 GNUNET_memcpy (&creq[1], app->id, app_id_size);
2497 2497
2498 app->connect_msg = &creq->header; 2498 app->connect_msg = &creq->header;
2499 app_send_connect_msg (app); 2499 app_send_connect_msg (app);
diff --git a/src/social/test_social.c b/src/social/test_social.c
index dd38a2920..dc73705c6 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -326,7 +326,7 @@ notify_data (void *cls, uint16_t *data_size, void *data)
326 tmit->paused = GNUNET_NO; 326 tmit->paused = GNUNET_NO;
327 327
328 *data_size = size; 328 *data_size = size;
329 memcpy (data, tmit->data[tmit->n], size); 329 GNUNET_memcpy (data, tmit->data[tmit->n], size);
330 330
331 return ++tmit->n < tmit->data_count ? GNUNET_NO : GNUNET_YES; 331 return ++tmit->n < tmit->data_count ? GNUNET_NO : GNUNET_YES;
332} 332}