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:
parent
367b758baf
commit
4bd99aaf07
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user