diff options
author | lurchi <lurchi@strangeplace.net> | 2019-06-27 11:04:15 +0200 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2019-06-27 11:41:06 +0200 |
commit | 6e75970dbd2e05d75712ee2112002c1c18a52074 (patch) | |
tree | 3597c7680b47ae03594f8d4c3ea857ce5687bcc6 /src/util | |
parent | 9228812aedaff897fdfae2b626726561de3d826d (diff) | |
download | gnunet-6e75970dbd2e05d75712ee2112002c1c18a52074.tar.gz gnunet-6e75970dbd2e05d75712ee2112002c1c18a52074.zip |
use GNUNET_strlcpy in strings.c too
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/strings.c | 3 |
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) | |||
826 | (uint8_t *) buf, &ssize); | 826 | (uint8_t *) buf, &ssize); |
827 | if (conved != (uint8_t *) buf) | 827 | if (conved != (uint8_t *) buf) |
828 | { | 828 | { |
829 | strncpy (buf, (char *) conved, sizeof (buf)); | 829 | GNUNET_strlcpy (buf, (char *) conved, sizeof (buf)); |
830 | buf[255 - 1] = '\0'; | ||
831 | free (conved); | 830 | free (conved); |
832 | } | 831 | } |
833 | } | 832 | } |