aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-xdht_hello.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-xdht_hello.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-xdht_hello.c')
-rw-r--r--src/dht/gnunet-service-xdht_hello.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dht/gnunet-service-xdht_hello.c b/src/dht/gnunet-service-xdht_hello.c
index f74700778..ceaf6f853 100644
--- a/src/dht/gnunet-service-xdht_hello.c
+++ b/src/dht/gnunet-service-xdht_hello.c
@@ -84,7 +84,7 @@ process_hello (void *cls, const struct GNUNET_PeerIdentity *peer,
84 hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer); 84 hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer);
85 GNUNET_free_non_null (hm); 85 GNUNET_free_non_null (hm);
86 hm = GNUNET_malloc (GNUNET_HELLO_size (hello)); 86 hm = GNUNET_malloc (GNUNET_HELLO_size (hello));
87 memcpy (hm, hello, GNUNET_HELLO_size (hello)); 87 GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello));
88 GNUNET_assert (GNUNET_SYSERR != 88 GNUNET_assert (GNUNET_SYSERR !=
89 GNUNET_CONTAINER_multipeermap_put (peer_to_hello, 89 GNUNET_CONTAINER_multipeermap_put (peer_to_hello,
90 peer, hm, 90 peer, hm,