From 6e75970dbd2e05d75712ee2112002c1c18a52074 Mon Sep 17 00:00:00 2001 From: lurchi Date: Thu, 27 Jun 2019 11:04:15 +0200 Subject: [PATCH] use GNUNET_strlcpy in strings.c too --- src/util/strings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/strings.c b/src/util/strings.c index d69244e83..ae0544296 100644 --- a/src/util/strings.c +++ b/src/util/strings.c @@ -826,8 +826,7 @@ GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t) (uint8_t *) buf, &ssize); if (conved != (uint8_t *) buf) { - strncpy (buf, (char *) conved, sizeof (buf)); - buf[255 - 1] = '\0'; + GNUNET_strlcpy (buf, (char *) conved, sizeof (buf)); free (conved); } } -- 2.25.1