mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
udev: refuse to process line when invalid program output is obtained
This commit is contained in:
parent
6b6e471a32
commit
567c19a62c
@ -1848,9 +1848,13 @@ static int udev_rule_apply_token_to_event(
|
||||
}
|
||||
|
||||
r = strv_split_newlines_full(&lines, result, EXTRACT_RETAIN_ESCAPE);
|
||||
if (r < 0)
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_rule_warning_errno(dev, rules, r,
|
||||
"Failed to extract lines from result of command \"%s\", ignoring: %m", buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
STRV_FOREACH(line, lines) {
|
||||
char *key, *value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user