projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ea320d
)
no null byte needed in message payload, so GNUNET_memcpy fits better
author
lurchi
<lurchi@strangeplace.net>
Thu, 27 Jun 2019 12:37:19 +0000
(14:37 +0200)
committer
lurchi
<lurchi@strangeplace.net>
Thu, 27 Jun 2019 12:37:19 +0000
(14:37 +0200)
src/testbed/testbed_api.c
patch
|
blob
|
history
diff --git
a/src/testbed/testbed_api.c
b/src/testbed/testbed_api.c
index 22ce7eb72392d0a869d565040112b17bdae71d6f..ade1a93de1d5787d650b0028d39f478944165878 100644
(file)
--- 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;
}