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:
9228812
)
use GNUNET_strlcpy in strings.c too
author
lurchi
<lurchi@strangeplace.net>
Thu, 27 Jun 2019 09:04:15 +0000
(11:04 +0200)
committer
lurchi
<lurchi@strangeplace.net>
Thu, 27 Jun 2019 09:41:06 +0000
(11:41 +0200)
src/util/strings.c
patch
|
blob
|
history
diff --git
a/src/util/strings.c
b/src/util/strings.c
index d69244e831f361dd8b892f2efeb4887af30216dd..ae05442967afb8db4d1de01e7cffd22f76f708bb 100644
(file)
--- 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);
}
}