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