From d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Jul 2016 17:20:23 +0000 Subject: -avoid calling memcpy() with NULL argument, even if len is 0 --- src/regex/regex_block_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/regex/regex_block_lib.c') diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c index cc9e1a08e..d545c89de 100644 --- a/src/regex/regex_block_lib.c +++ b/src/regex/regex_block_lib.c @@ -448,17 +448,17 @@ REGEX_BLOCK_create (const char *proof, block->num_edges = htons (num_edges); block->num_destinations = htons (unique_destinations); dests = (struct GNUNET_HashCode *) &block[1]; - memcpy (dests, destinations, sizeof (struct GNUNET_HashCode) * unique_destinations); + GNUNET_memcpy (dests, destinations, sizeof (struct GNUNET_HashCode) * unique_destinations); edgeinfos = (struct EdgeInfo *) &dests[unique_destinations]; aux = (char *) &edgeinfos[num_edges]; off = len; - memcpy (aux, proof, len); + GNUNET_memcpy (aux, proof, len); for (i=0;i