[OpenWrt-Devel] fixed a ubusd.c segment fault problem

yangchao yangchao1p at live.com
Thu Jun 18 07:18:33 EDT 2015


hi gays :

  this is a patch for ubusd.c


diff --git a/ubusd.c b/ubusd.c
index 8903105..ecf5bea 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -241,7 +241,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) {


this problem maybe not easy to happen,beacase of we need no retry in most times,but problem is also problem,so fixed it


发自 Windows 邮件
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150618/ecb94f24/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list