diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2015-01-18 14:01:00 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-20 00:20:17 +1100 |
commit | f101d8291da01bbbfd6fb8c569cfd0cc61c0d346 (patch) | |
tree | bfa96ae618031be510c7ebc6d3f8f6fe1830856f | |
parent | 35d6022b55b7969fc10c261cb6aa78cc4a5fcc41 (diff) |
upstream commit
string truncation due to sizeof(size) ok djm markus
-rw-r--r-- | krl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -14,7 +14,7 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* $OpenBSD: krl.c,v 1.26 2015/01/14 15:02:39 djm Exp $ */ | 17 | /* $OpenBSD: krl.c,v 1.27 2015/01/18 14:01:00 deraadt Exp $ */ |
18 | 18 | ||
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | 20 | ||
@@ -793,7 +793,7 @@ format_timestamp(u_int64_t timestamp, char *ts, size_t nts) | |||
793 | t = timestamp; | 793 | t = timestamp; |
794 | tm = localtime(&t); | 794 | tm = localtime(&t); |
795 | if (tm == NULL) | 795 | if (tm == NULL) |
796 | strlcpy(ts, "<INVALID>", sizeof(nts)); | 796 | strlcpy(ts, "<INVALID>", nts); |
797 | else { | 797 | else { |
798 | *ts = '\0'; | 798 | *ts = '\0'; |
799 | strftime(ts, nts, "%Y%m%dT%H%M%S", tm); | 799 | strftime(ts, nts, "%Y%m%dT%H%M%S", tm); |