ubusd: fix offset calculation (based on patch by Yang Chao)
authorFelix Fietkau <nbd@openwrt.org>
Mon, 6 Jul 2015 16:42:36 +0000 (18:42 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 6 Jul 2015 16:42:36 +0000 (18:42 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ubusd.c

diff --git a/ubusd.c b/ubusd.c
index 65b82cab3f79da491bd6f886c7674aea2d97957a..aa723511e58709ab7730cd84ac11f44933b31fdd 100644 (file)
--- a/ubusd.c
+++ b/ubusd.c
@@ -242,7 +242,7 @@ retry:
 
                fd_buf.fd = -1;
 
-               iov.iov_base = &cl->hdrbuf + offset;
+               iov.iov_base = ((char *) &cl->hdrbuf) + offset;
                iov.iov_len = sizeof(cl->hdrbuf) - offset;
 
                if (cl->pending_msg_fd < 0) {