The previous fix seems to not be enough. /service.c:242:10: error: 'strncpy' offset 6 from the object at 'b' is out of the bounds of referenced subobject 'name' with type 'uint8_t[]' {aka 'unsigned char[]'} at offset 6 [-Werror=array-bounds] 242 | s->id = strncpy(d_id, blobmsg_name(b), n);
Signed-off-by: Rosen Penev <ros...@gmail.com> --- service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.c b/service.c index 53f44c1..e649b64 100644 --- a/service.c +++ b/service.c @@ -240,7 +240,7 @@ service_load_blob(struct blob_attr *b) return; s->port = blobmsg_get_u32(_tb[SERVICE_PORT]); - s->id = strncpy(d_id, blobmsg_name(b), n); + s->id = memcpy(d_id, blobmsg_name(b), n); if (_tb[SERVICE_INSTANCE]) s->instance = strcpy(d_instance, blobmsg_get_string(_tb[SERVICE_INSTANCE])); else -- 2.26.2 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel