aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_testbed.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/testbed/testbed_api_testbed.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/testbed/testbed_api_testbed.c')
-rw-r--r--src/testbed/testbed_api_testbed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c
index b3b2c3987..1b6656234 100644
--- a/src/testbed/testbed_api_testbed.c
+++ b/src/testbed/testbed_api_testbed.c
@@ -1158,7 +1158,7 @@ host_habitable_cb (void *cls, const struct GNUNET_TESTBED_Host *host,
1158 old_hosts = rc->hosts; 1158 old_hosts = rc->hosts;
1159 rc->hosts = 1159 rc->hosts =
1160 GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host *) * rc->num_hosts); 1160 GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host *) * rc->num_hosts);
1161 memcpy (rc->hosts, &old_hosts[1], 1161 GNUNET_memcpy (rc->hosts, &old_hosts[1],
1162 (sizeof (struct GNUNET_TESTBED_Host *) * rc->num_hosts)); 1162 (sizeof (struct GNUNET_TESTBED_Host *) * rc->num_hosts));
1163 GNUNET_free (old_hosts); 1163 GNUNET_free (old_hosts);
1164 } 1164 }