fix max message length handling - exclude the header
[project/ubus.git] / libubus.h
index 9f21647..cb575b0 100644 (file)
--- a/libubus.h
+++ b/libubus.h
@@ -97,7 +97,7 @@ struct ubus_context {
 
        struct {
                struct ubus_msghdr hdr;
-               char data[UBUS_MAX_MSGLEN - sizeof(struct ubus_msghdr)];
+               char data[UBUS_MAX_MSGLEN];
        } msgbuf;
 };