mirror of
https://github.com/systemd/systemd.git
synced 2025-08-26 17:49:52 +03:00
shared: time-dst - ensure nulstr is null terminated
Fixes CID #1237772.
This commit is contained in:
@ -244,6 +244,8 @@ read_again:
|
|||||||
if (fread(zone_names, 1, chars, f) != chars)
|
if (fread(zone_names, 1, chars, f) != chars)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
zone_names[chars] = '\0';
|
||||||
|
|
||||||
for (i = 0; i < num_isstd; ++i) {
|
for (i = 0; i < num_isstd; ++i) {
|
||||||
int c = getc(f);
|
int c = getc(f);
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
|
Reference in New Issue
Block a user