[systemd-commits] src/shared

Tom Gundersen tomegun at kemper.freedesktop.org
Sat Nov 29 01:40:36 PST 2014


 src/shared/time-dst.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 681f9718ce322da95578e20ed975dfb34e7edd23
Author: Tom Gundersen <teg at jklm.no>
Date:   Sat Nov 29 10:40:21 2014 +0100

    shared: time-dst - ensure nulstr is null terminated
    
    Fixes CID #1237772.

diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c
index 6195b11..926d22b 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)



More information about the systemd-commits mailing list