From c2c39eeb309ea7d0beee3b43bf9d1e84ad232c1c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 5 Aug 2013 13:19:38 +0200 Subject: [PATCH] luci2: fix incorrect buffer length in luci2.opkg config_set call --- luci2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci2.c b/luci2.c index 001b336..b63123d 100644 --- a/luci2.c +++ b/luci2.c @@ -1952,7 +1952,7 @@ rpc_luci2_opkg_config_set(struct ubus_context *ctx, struct ubus_object *obj, return rpc_errno_status(); fwrite(blobmsg_data(tb[RPC_D_DATA]), - blobmsg_data_len(tb[RPC_D_DATA]), 1, f); + blobmsg_data_len(tb[RPC_D_DATA]) - 1, 1, f); fclose(f); return 0; -- 2.25.1