summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlurchi <lurchi@strangeplace.net>2019-06-27 11:04:15 +0200
committerlurchi <lurchi@strangeplace.net>2019-06-27 11:41:06 +0200
commit6e75970dbd2e05d75712ee2112002c1c18a52074 (patch)
tree3597c7680b47ae03594f8d4c3ea857ce5687bcc6
parent9228812aedaff897fdfae2b626726561de3d826d (diff)
use GNUNET_strlcpy in strings.c too
-rw-r--r--src/util/strings.c3
1 files changed, 1 insertions, 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);
}
}