aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.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/dht/gnunet-service-dht.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
downloadgnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz
gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index e3b9d59a4..9de76ab7a 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -90,7 +90,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
90 GNUNET_assert (message != NULL); 90 GNUNET_assert (message != NULL);
91 GNUNET_free_non_null (GDS_my_hello); 91 GNUNET_free_non_null (GDS_my_hello);
92 GDS_my_hello = GNUNET_malloc (ntohs (message->size)); 92 GDS_my_hello = GNUNET_malloc (ntohs (message->size));
93 memcpy (GDS_my_hello, message, ntohs (message->size)); 93 GNUNET_memcpy (GDS_my_hello, message, ntohs (message->size));
94} 94}
95 95
96 96