X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdatacache%2Fplugin_datacache_heap.c;h=185d54f2f81d18d02630e6bae8c1dab8607ea177;hb=2105059516320800eaa8fff1196b58f29a50ba7c;hp=5492a8ec59bf44e4d6005612fd49bd791122fc9d;hpb=786745c969589eae2aa069885b40eba0f3989507;p=oweals%2Fgnunet.git diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c index 5492a8ec5..185d54f2f 100644 --- a/src/datacache/plugin_datacache_heap.c +++ b/src/datacache/plugin_datacache_heap.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet - Copyright (C) 2012, 2015 Christian Grothoff (and other contributing authors) + Copyright (C) 2012, 2015 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /** @@ -177,7 +177,7 @@ put_cb (void *cls, GNUNET_array_grow (val->path_info, val->path_info_len, put_ctx->path_info_len); - memcpy (val->path_info, + GNUNET_memcpy (val->path_info, put_ctx->path_info, put_ctx->path_info_len * sizeof (struct GNUNET_PeerIdentity)); GNUNET_CONTAINER_heap_update_cost (put_ctx->heap, @@ -237,7 +237,7 @@ heap_plugin_put (void *cls, if (GNUNET_YES == put_ctx.found) return 0; val = GNUNET_malloc (sizeof (struct Value) + size); - memcpy (&val[1], data, size); + GNUNET_memcpy (&val[1], data, size); val->key = *key; val->type = type; val->discard_time = discard_time; @@ -245,7 +245,8 @@ heap_plugin_put (void *cls, GNUNET_array_grow (val->path_info, val->path_info_len, path_info_len); - memcpy (val->path_info, path_info, + GNUNET_memcpy (val->path_info, + path_info, path_info_len * sizeof (struct GNUNET_PeerIdentity)); (void) GNUNET_CONTAINER_multihashmap_put (plugin->map, &val->key,