summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-08-09 12:56:54 +0200
committerPetr Štetiar <ynezz@true.cz>2022-02-15 18:10:32 +0100
commitb32a0e17b37847e8357b53a358d1311bfc3ad5d2 (patch)
tree5261af7a4fde47e5656f5a6d6b4d083b08cd1cfb
parentedda23fd018034493168ba67159b20d27570082b (diff)
downloadubus-openwrt-19.07.tar.gz
libubus: increase stack depth for processing obj msgsopenwrt-19.07
Avoid running into an issue where issuing a request from an obj message can lead to recursive message processing and list corruption Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit a72457b61df045d3c499a6211362b751710590d7)
-rw-r--r--libubus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libubus.c b/libubus.c
index 7ce454e..aee2a3b 100644
--- a/libubus.c
+++ b/libubus.c
@@ -103,7 +103,9 @@ ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd)
break;
}
+ ctx->stack_depth++;
ubus_process_obj_msg(ctx, buf, fd);
+ ctx->stack_depth--;
break;
case UBUS_MSG_MONITOR:
if (ctx->monitor_cb)