netifd: fix misplaced ")"
authorFelix Fietkau <[email protected]>
Fri, 12 Sep 2025 09:26:49 +0000 (11:26 +0200)
committerFelix Fietkau <[email protected]>
Fri, 12 Sep 2025 09:26:52 +0000 (11:26 +0200)
Fixes memory corruption issue

Fixes: https://github.com/openwrt/netifd/issues/54
Signed-off-by: Felix Fietkau <[email protected]>
ucode.c

diff --git a/ucode.c b/ucode.c
index 291bb3e3bdf06e81f3b7051fc39e78c31568a611..553a72e71aa4fd92ea82666b4f963638612a120e 100644 (file)
--- a/ucode.c
+++ b/ucode.c
@@ -442,7 +442,7 @@ uc_netifd_process(uc_vm_t *vm, size_t nargs)
 
        prefix_str = ucv_string_get(prefix);
 
-       res = ucv_resource_create_ex(vm, "netifd.process", (void **)&up, 1, sizeof(*up) + strlen(prefix_str + 1));
+       res = ucv_resource_create_ex(vm, "netifd.process", (void **)&up, 1, sizeof(*up) + strlen(prefix_str) + 1);
        if (!res)
                return NULL;