--- /dev/null
+--- mISDNuser-2.0.19/lib/layer3/q931.c~ 2014-10-20 14:18:55.000000000 +0200
++++ mISDNuser-2.0.19/lib/layer3/q931.c 2020-04-26 17:16:23.169108417 +0200
+@@ -506,7 +506,7 @@
+ int
+ mi_encode_redirecting_nr(struct l3_msg *l3m, char *nr, int pres, unsigned int type, unsigned int plan, int reason)
+ {
+- unsigned char ie[24];
++ unsigned char ie[32];
+ int l;
+
+ if (nr == NULL || *nr == 0) /* not provided */
+@@ -537,7 +537,7 @@
+ int
+ mi_encode_redirection_nr(struct l3_msg *l3m, char *nr, int pres, unsigned int type, unsigned int plan)
+ {
+- unsigned char ie[24];
++ unsigned char ie[32];
+ int l;
+
+ if (nr == NULL || *nr == 0) /* not provided */
+--- mISDNuser-2.0.19/bridge/bridge.c.orig 2014-10-20 14:18:55.000000000 +0200
++++ mISDNuser-2.0.19/bridge/bridge.c 2020-04-26 17:27:38.799085748 +0200
+@@ -147,7 +147,7 @@
+ */
+ static void ph_control(int sock, int c1, int c2)
+ {
+- unsigned char data[MISDN_HEADER_LEN+sizeof(int)+sizeof(int)];
++ unsigned char data[MISDN_HEADER_LEN+sizeof(unsigned long)*2];
+ struct mISDNhead *hh = (struct mISDNhead *)data;
+ int len;
+ unsigned long *d = (unsigned long *)(data + MISDN_HEADER_LEN);
--- /dev/null
+--- mISDNuser-2.0.19/lib/suppserv/diversion.c~ 2014-10-20 14:18:55.000000000 +0200
++++ mISDNuser-2.0.19/lib/suppserv/diversion.c 2020-04-26 17:14:37.549111926 +0200
+@@ -784,7 +784,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacInterrogationDiversion(__u8 * Dest, const const struct asn1_parm *pc, const struct FacInterrogationDiversion *InterrogationDiversion)
++int encodeFacInterrogationDiversion(__u8 * Dest, const struct asn1_parm *pc, const struct FacInterrogationDiversion *InterrogationDiversion)
+ {
+ int Length;
+ __u8 *p;
+@@ -893,7 +893,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacDiversionInformation(__u8 * Dest, const const struct asn1_parm *pc, const struct FacDiversionInformation *DiversionInformation)
++int encodeFacDiversionInformation(__u8 * Dest, const struct asn1_parm *pc, const struct FacDiversionInformation *DiversionInformation)
+ {
+ int Length;
+ __u8 *p;
+@@ -1052,7 +1052,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacCallDeflection(__u8 * Dest, const const struct asn1_parm *pc, const struct FacCallDeflection *CallDeflection)
++int encodeFacCallDeflection(__u8 * Dest, const struct asn1_parm *pc, const struct FacCallDeflection *CallDeflection)
+ {
+ int Length;
+ __u8 *p;
+@@ -1142,7 +1142,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacCallRerouteing(__u8 * Dest, const const struct asn1_parm *pc, const struct FacCallRerouteing *CallRerouteing)
++int encodeFacCallRerouteing(__u8 * Dest, const struct asn1_parm *pc, const struct FacCallRerouteing *CallRerouteing)
+ {
+ int Length;
+ __u8 *p;
+@@ -1284,7 +1284,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacInterrogateServedUserNumbers(__u8 * Dest, const const struct asn1_parm *pc, const struct FacServedUserNumberList *InterrogateServedUserNumbers)
++int encodeFacInterrogateServedUserNumbers(__u8 * Dest, const struct asn1_parm *pc, const struct FacServedUserNumberList *InterrogateServedUserNumbers)
+ {
+ int Length;
+ __u8 *p;
+@@ -1353,7 +1353,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacDivertingLegInformation1(__u8 * Dest, const const struct asn1_parm *pc, const struct FacDivertingLegInformation1 *DivertingLegInformation1)
++int encodeFacDivertingLegInformation1(__u8 * Dest, const struct asn1_parm *pc, const struct FacDivertingLegInformation1 *DivertingLegInformation1)
+ {
+ int Length;
+ __u8 *p;
+@@ -1422,7 +1422,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacDivertingLegInformation2(__u8 * Dest, const const struct asn1_parm *pc, const struct FacDivertingLegInformation2 *DivertingLegInformation2)
++int encodeFacDivertingLegInformation2(__u8 * Dest, const struct asn1_parm *pc, const struct FacDivertingLegInformation2 *DivertingLegInformation2)
+ {
+ int Length;
+ __u8 *p;
+@@ -1524,7 +1524,7 @@
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+-int encodeFacDivertingLegInformation3(__u8 * Dest, const const struct asn1_parm *pc, const struct FacDivertingLegInformation3 *DivertingLegInformation3)
++int encodeFacDivertingLegInformation3(__u8 * Dest, const struct asn1_parm *pc, const struct FacDivertingLegInformation3 *DivertingLegInformation3)
+ {
+ int Length;
+ __u8 *p;
Summary(pl.UTF-8): Część stosu modularnego ISDN (mISDN) dla przestrzeni użytkownika
Name: mISDNuser
Version: 2.0.19
-Release: 2
+Release: 3
License: LGPL v2.1
Group: Libraries
# git clone git://git.misdn.eu/mISDNuser.git
# Source0-md5: fb4bf6c110bea0a30486015ca56e80d8
Patch0: git.patch
Patch1: x32.patch
+Patch2: const-const.patch
+Patch3: array-bounds.patch
URL: http://www.isdn4linux.de/mISDN/
BuildRequires: autoconf >= 2.63
BuildRequires: automake
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
+export CFLAGS="%{rpmcflags} -Wno-stringop-truncation"
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/var/run/mISDNcapid
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
%{__rm} $RPM_BUILD_ROOT%{_libdir}/capi/lib*.la
# sample
%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/capi20.conf
-%endif
-
-install -d $RPM_BUILD_ROOT/lib
-%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/udev $RPM_BUILD_ROOT/lib
+install -d $RPM_BUILD_ROOT/var/run/mISDNcapid
install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/mISDNcapid.conf <<EOF
d /var/run/mISDNcapid 755 root root -
EOF
+%endif
+
+install -d $RPM_BUILD_ROOT/lib
+%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/udev $RPM_BUILD_ROOT/lib
%clean
rm -rf $RPM_BUILD_ROOT