diff mbox

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

Message ID BAY403-EAS2893D1A3093E5FD0E319BE7F6A50@phx.gbl
State Superseded
Headers show

Commit Message

yangchao June 18, 2015, 11:18 a.m. UTC
hi gays :

  this is a patch for ubusd.c




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 邮件

Comments

Rafał Miłecki June 18, 2015, 11:56 a.m. UTC | #1
oOn 18 June 2015 at 13:18, yangchao <yangchao1p@live.com> wrote:
> hi gays :
>   this is a patch for ubusd.c

Please resend as a proper patch, using text/plain (not text/html),
with a proper subject and commit message. See
https://dev.openwrt.org/wiki/SubmittingPatches for details.
diff mbox

Patch

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) {