mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 14:14:35 +00:00
shared: time-dst - ensure nulstr is null terminated
Fixes CID #1237772.
(cherry picked from commit 681f9718ce)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
748231b3ac
commit
48da391c5e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user