aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-helper-testbed.c
diff options
context:
space:
mode:
authorlurchi <lurchi@strangeplace.net>2019-06-27 10:49:40 +0200
committerlurchi <lurchi@strangeplace.net>2019-06-27 10:49:40 +0200
commitb9771c5f5edcbeb965fa291a281943d866c3ddb6 (patch)
treee53141e844dfe7032d018cb5bfebd31fe02f7816 /src/testbed/gnunet-helper-testbed.c
parent0e7c93c3a0a3aa966503a8ae4caf3a21914e4126 (diff)
downloadgnunet-b9771c5f5edcbeb965fa291a281943d866c3ddb6.tar.gz
gnunet-b9771c5f5edcbeb965fa291a281943d866c3ddb6.zip
use GNUNET_strlcpy instead of strncpy where possible
Diffstat (limited to 'src/testbed/gnunet-helper-testbed.c')
-rw-r--r--src/testbed/gnunet-helper-testbed.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c
index 25d9724fa..c56a795a6 100644
--- a/src/testbed/gnunet-helper-testbed.c
+++ b/src/testbed/gnunet-helper-testbed.c
@@ -374,6 +374,7 @@ tokenizer_cb (void *cls,
374 if (0 != hostname_size) 374 if (0 != hostname_size)
375 { 375 {
376 hostname = GNUNET_malloc (hostname_size + 1); 376 hostname = GNUNET_malloc (hostname_size + 1);
377 /* intentionally use strncpy (hostname not null terminated) */
377 (void) strncpy (hostname, ((char *) &msg[1]) + trusted_ip_size + 1, 378 (void) strncpy (hostname, ((char *) &msg[1]) + trusted_ip_size + 1,
378 hostname_size); 379 hostname_size);
379 hostname[hostname_size] = '\0'; 380 hostname[hostname_size] = '\0';