summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/ubus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ubus.c b/lib/ubus.c
index 7f30fb8..4766119 100644
--- a/lib/ubus.c
+++ b/lib/ubus.c
@@ -1461,7 +1461,7 @@ uc_ubus_object_register(struct ubus_context *ctx, const char *ubus_object_name,
method = (struct ubus_method *)mptr;
obj = &uuobj->obj;
- obj->name = strncpy(onptr, ubus_object_name, namelen);
+ obj->name = memcpy(onptr, ubus_object_name, namelen);
obj->methods = method;
if (ubus_object_methods) {