From d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Jul 2016 17:20:23 +0000 Subject: -avoid calling memcpy() with NULL argument, even if len is 0 --- src/transport/transport_api_address_to_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/transport/transport_api_address_to_string.c') 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, -- cgit v1.2.3