summaryrefslogtreecommitdiff
path: root/src/shared/time-dst.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-11-29 10:40:21 +0100
committerTom Gundersen <teg@jklm.no>2014-11-29 10:40:21 +0100
commit681f9718ce322da95578e20ed975dfb34e7edd23 (patch)
treec9981adab60b03dfbb6597a5982e516bec50c748 /src/shared/time-dst.c
parent0acd5a08f5b2ff0580d4fc4d7fc2ff144b2f788f (diff)
shared: time-dst - ensure nulstr is null terminated
Fixes CID #1237772.
Diffstat (limited to 'src/shared/time-dst.c')
-rw-r--r--src/shared/time-dst.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c
index 6195b11017..926d22b94b 100644
--- a/src/shared/time-dst.c
+++ b/src/shared/time-dst.c
@@ -244,6 +244,8 @@ read_again:
if (fread(zone_names, 1, chars, f) != chars)
return -EINVAL;
+ zone_names[chars] = '\0';
+
for (i = 0; i < num_isstd; ++i) {
int c = getc(f);
if (c == EOF)