summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlurchi <lurchi@strangeplace.net>2019-06-27 14:37:19 +0200
committerlurchi <lurchi@strangeplace.net>2019-06-27 14:37:19 +0200
commit32063cf3f2f09f39634dac791f4b71e4bd15cc47 (patch)
treef27e3676a80ab8e7fb21c94d58f87d3fa15d7c07
parent3ea320df4716a4ce16d738fa47bbe59740e36f42 (diff)
no null byte needed in message payload, so GNUNET_memcpy fits better
-rw-r--r--src/testbed/testbed_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index 22ce7eb72..ade1a93de 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -2014,9 +2014,9 @@ GNUNET_TESTBED_create_helper_init_msg_ (const char *trusted_ip,
msg->config_size = htons (config_size);
(void) strcpy ((char *) &msg[1], trusted_ip);
if (0 != hostname_len)
- /* intentionally use strncpy (no null byte needed) */
- (void) strncpy (((char *) &msg[1]) + trusted_ip_len + 1, hostname,
- hostname_len);
+ GNUNET_memcpy (&msg[1] + trusted_ip_len + 1,
+ hostname,
+ hostname_len);
return msg;
}