1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

fix: heap buffer overflow

This commit is contained in:
Václav Ovsík 2025-03-02 11:27:04 +01:00
parent 367b758baf
commit 4bd99aaf07

View File

@ -923,7 +923,7 @@ static int parse_and_every(const char *s, usec_t *ts, usec_t *rep) {
p_ts = strndup(s, p - s);
i = strlen(p_ts);
while ( isspace(p_ts[--i]) && i >= 0 )
while ( i > 0 && isspace(p_ts[--i]) )
p_ts[i] = (char)0;
r = parse_timestamp(p_ts, ts);