summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKartashov Alexey2025-10-09 06:55:35 +0000
committerDaniel Golle2026-02-09 10:59:14 +0000
commitbafdfff100d3bf1e91d35664b97cfd101d564416 (patch)
treec138dec35577a51e9abdcc9921a38a5ee726fd65
parent3b3501abb63d9aa59ccc20acf5f2c2be48190b25 (diff)
system: fix arguments validation in ubus handler
Fix arguments validation (broken access to blob_attr property) Fixes: 03aab02 ("add a ubus handler that allows sending signals to processes") Signed-off-by: Kartashov Alexey <ya.antixrist@gmail.com> [improved commit message] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/system.c b/system.c
index 7a4c24d..f6fe444 100644
--- a/system.c
+++ b/system.c
@@ -538,7 +538,7 @@ static int proc_signal(struct ubus_context *ctx, struct ubus_object *obj,
return UBUS_STATUS_INVALID_ARGUMENT;
blobmsg_parse(signal_policy, __SIGNAL_MAX, tb, blob_data(msg), blob_len(msg));
- if (!tb[SIGNAL_PID || !tb[SIGNAL_NUM]])
+ if (!tb[SIGNAL_PID] || !tb[SIGNAL_NUM])
return UBUS_STATUS_INVALID_ARGUMENT;
kill(blobmsg_get_u32(tb[SIGNAL_PID]), blobmsg_get_u32(tb[SIGNAL_NUM]));