mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
core: fix potential crash in BPFProgram=
This commit is contained in:
parent
cc87b3f68f
commit
d762abece9
@ -5630,7 +5630,7 @@ int config_parse_bpf_foreign_program(
|
||||
r = extract_first_word(&rvalue, &word, ":", 0);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse foreign BPF program, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user