summaryrefslogtreecommitdiff
path: root/src/peerstore/plugin_peerstore_flat.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/peerstore/plugin_peerstore_flat.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/peerstore/plugin_peerstore_flat.c')
-rw-r--r--src/peerstore/plugin_peerstore_flat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peerstore/plugin_peerstore_flat.c b/src/peerstore/plugin_peerstore_flat.c
index 24011e014..f5943e509 100644
--- a/src/peerstore/plugin_peerstore_flat.c
+++ b/src/peerstore/plugin_peerstore_flat.c
@@ -294,10 +294,10 @@ peerstore_flat_store_record (void *cls, const char *sub_system,
entry->sub_system = GNUNET_strdup (sub_system);
entry->key = GNUNET_strdup (key);
entry->value = GNUNET_malloc (size);
- memcpy (entry->value, value, size);
+ GNUNET_memcpy (entry->value, value, size);
entry->value_size = size;
entry->peer = GNUNET_new (struct GNUNET_PeerIdentity);
- memcpy (entry->peer, peer, sizeof (struct GNUNET_PeerIdentity));
+ GNUNET_memcpy (entry->peer, peer, sizeof (struct GNUNET_PeerIdentity));
entry->expiry = GNUNET_new (struct GNUNET_TIME_Absolute);
entry->expiry->abs_value_us = expiry.abs_value_us;