[LEDE-DEV] [PATCH] Fix the length of msg buffer after realloc

Rujun Wang chinawrj at gmail.com
Wed Jun 22 20:06:06 PDT 2016


Signed-off-by: Rujun Wang <chinawrj at gmail.com>
---
 libubus-io.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libubus-io.c b/libubus-io.c
index 9320bf3..0582ff7 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -259,6 +259,7 @@ static bool alloc_msg_buf(struct ubus_context *ctx, int len)
 		return false;
 
 	ctx->msgbuf.data = ptr;
+	ctx->msgbuf_data_len = len;
 	return true;
 }
 
-- 
1.9.1




More information about the Lede-dev mailing list