summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp_broadcasting.c
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/transport/plugin_transport_udp_broadcasting.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/transport/plugin_transport_udp_broadcasting.c')
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index 6c5efd5f1..e9caa3aa7 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -226,7 +226,7 @@ prepare_beacon (struct Plugin *plugin,
msg->sender = *(plugin->env->my_identity);
msg->header.size = htons (msg_size);
msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON);
- memcpy (&msg[1], hello, hello_size);
+ GNUNET_memcpy (&msg[1], hello, hello_size);
return msg_size;
}
@@ -435,7 +435,7 @@ iface_proc (void *cls,
ba = GNUNET_new (struct BroadcastAddress);
ba->plugin = plugin;
ba->addr = GNUNET_malloc (addrlen);
- memcpy (ba->addr, broadcast_addr, addrlen);
+ GNUNET_memcpy (ba->addr, broadcast_addr, addrlen);
ba->addrlen = addrlen;
if ( (GNUNET_YES == plugin->enable_ipv4) &&