From 441e95b04a9544f8965257bbe0e558e89a3df69b Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Thu, 30 Apr 2009 12:05:50 +0000 Subject: [PATCH] - Avoid aliasing undefined by ISO C --- stunnel-4.27-aliasing.patch | 21 +++++++++++++++++++++ stunnel.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 stunnel-4.27-aliasing.patch diff --git a/stunnel-4.27-aliasing.patch b/stunnel-4.27-aliasing.patch new file mode 100644 index 0000000..185e871 --- /dev/null +++ b/stunnel-4.27-aliasing.patch @@ -0,0 +1,21 @@ +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); diff --git a/stunnel.spec b/stunnel.spec index ae36c90..a042eb0 100644 --- a/stunnel.spec +++ b/stunnel.spec @@ -1,7 +1,7 @@ Summary: An SSL-encrypting socket wrapper Name: stunnel Version: 4.27 -Release: 1 +Release: 2 License: GPLv2 Group: Applications/Internet URL: http://stunnel.mirt.net/ @@ -14,6 +14,7 @@ Source5: pop3-redirect.xinetd Source6: stunnel-pop3s-client.conf Patch0: stunnel-4.27-authpriv.patch Patch1: stunnel-4.27-sample.patch +Patch2: stunnel-4.27-aliasing.patch Buildroot: %{_tmppath}/stunnel-root # util-linux is needed for rename BuildRequires: openssl-devel, pkgconfig, tcp_wrappers-devel, util-linux @@ -27,6 +28,7 @@ in conjunction with imapd to create an SSL secure IMAP server. %setup -q %patch0 -p1 -b .authpriv %patch1 -p1 -b .sample +%patch2 -p1 -b .aliasing iconv -f iso-8859-1 -t utf-8 < doc/stunnel.fr.8 > doc/stunnel.fr.8_ mv doc/stunnel.fr.8_ doc/stunnel.fr.8 @@ -79,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT %exclude %{_sysconfdir}/stunnel/* %changelog +* Wed Apr 29 2009 Miloslav Trmač - 4.27-2 +- Avoid aliasing undefined by ISO C + * Thu Apr 16 2009 Miloslav Trmač - 4.27-1 - Update to stunnel-4.27.