summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-05-02 22:37:17 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-05-03 10:09:53 +0200
commit740831076cfcf2f73f3063fbb040c1ea593dfe6c (patch)
tree0e8de689a29e95914c40b3b5357235073b3376d3 /src/shared
parent1febf60f9d67b851e3f0ace2d87b718d3e0b04d5 (diff)
downloadsystemd-740831076cfcf2f73f3063fbb040c1ea593dfe6c.tar.gz
shared: reject empty attachment path
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bpf-program.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/bpf-program.c b/src/shared/bpf-program.c
index d5eb6f4ccb..f4bb7f390c 100644
--- a/src/shared/bpf-program.c
+++ b/src/shared/bpf-program.c
@@ -467,6 +467,9 @@ int bpf_program_deserialize_attachment(const char *v, FDSet *fds, BPFProgram **b
return at;
/* The rest is the path */
+ if (isempty(v))
+ return -EINVAL;
+
l = cunescape(v, 0, &unescaped);
if (l < 0)
return l;