diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/transport/transport_api_address_to_string.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-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.c | 4 |
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 | |||
233 | msg->addrlen = htons ((uint16_t) alen); | 233 | msg->addrlen = htons ((uint16_t) alen); |
234 | msg->timeout = GNUNET_TIME_relative_hton (timeout); | 234 | msg->timeout = GNUNET_TIME_relative_hton (timeout); |
235 | addrbuf = (char *) &msg[1]; | 235 | addrbuf = (char *) &msg[1]; |
236 | memcpy (addrbuf, | 236 | GNUNET_memcpy (addrbuf, |
237 | address->address, | 237 | address->address, |
238 | alen); | 238 | alen); |
239 | memcpy (&addrbuf[alen], | 239 | GNUNET_memcpy (&addrbuf[alen], |
240 | address->transport_name, | 240 | address->transport_name, |
241 | slen); | 241 | slen); |
242 | GNUNET_MQ_send (alc->mq, | 242 | GNUNET_MQ_send (alc->mq, |