mirror of
https://github.com/systemd/systemd.git
synced 2025-02-09 13:57:42 +03:00
shared: time-dst: Avoid buffer overflow
Commit 681f9718 introduced an additional null terminator for the zone names. Increase the allocation of "transitions" to actually make room for this.
This commit is contained in:
parent
d47f6ca5f9
commit
e17fb3c1dd
@ -183,7 +183,8 @@ read_again:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
transitions = malloc0(total_size + tzspec_len);
|
||||
/* leave space for additional zone_names zero terminator */
|
||||
transitions = malloc0(total_size + tzspec_len + 1);
|
||||
if (transitions == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user