22 lines
770 B
Diff
22 lines
770 B
Diff
diff -urN stunnel/src/libwrap.c stunnel-4.27/src/libwrap.c
|
|
--- stunnel/src/libwrap.c 2009-04-16 10:48:49.000000000 +0200
|
|
+++ stunnel-4.27/src/libwrap.c 2009-04-29 11:34:05.000000000 +0200
|
|
@@ -246,7 +246,7 @@
|
|
s_log(LOG_ERR, "control type != SCM_RIGHTS");
|
|
return -1;
|
|
}
|
|
- *recvfd=*((int *)CMSG_DATA(cmptr));
|
|
+ memcpy(recvfd, CMSG_DATA(cmptr), sizeof(int));
|
|
#else
|
|
if(msg.msg_accrightslen==sizeof(int))
|
|
*recvfd=newfd;
|
|
@@ -273,7 +273,7 @@
|
|
cmptr->cmsg_len=CMSG_LEN(sizeof(int));
|
|
cmptr->cmsg_level=SOL_SOCKET;
|
|
cmptr->cmsg_type=SCM_RIGHTS;
|
|
- *((int *)CMSG_DATA(cmptr))=sendfd;
|
|
+ memcpy(CMSG_DATA(cmptr), &sendfd, sizeof(int));
|
|
#else
|
|
msg.msg_accrights=(caddr_t)&sendfd;
|
|
msg.msg_accrightslen=sizeof(int);
|