summaryrefslogtreecommitdiff
path: root/src/transport/transport_api_address_to_string.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/transport_api_address_to_string.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/transport/transport_api_address_to_string.c')
-rw-r--r--src/transport/transport_api_address_to_string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c
index 53e4c832c..a2cad07b0 100644
--- a/src/transport/transport_api_address_to_string.c
+++ b/src/transport/transport_api_address_to_string.c
@@ -233,10 +233,10 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf
msg->addrlen = htons ((uint16_t) alen);
msg->timeout = GNUNET_TIME_relative_hton (timeout);
addrbuf = (char *) &msg[1];
- memcpy (addrbuf,
+ GNUNET_memcpy (addrbuf,
address->address,
alen);
- memcpy (&addrbuf[alen],
+ GNUNET_memcpy (&addrbuf[alen],
address->transport_name,
slen);
GNUNET_MQ_send (alc->mq,