]> git.pld-linux.org Git - packages/hylafax.git/commitdiff
- added faxRecvInfo patch (fix bug detected by gcc 7 + many more found in this code) auto/th/hylafax-6.0.6-1
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 16 Apr 2018 17:10:37 +0000 (19:10 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 16 Apr 2018 17:10:37 +0000 (19:10 +0200)
hylafax-FaxRecvInfo.patch [new file with mode: 0644]
hylafax.spec

diff --git a/hylafax-FaxRecvInfo.patch b/hylafax-FaxRecvInfo.patch
new file mode 100644 (file)
index 0000000..0a5449c
--- /dev/null
@@ -0,0 +1,36 @@
+--- hylafax-6.0.6/libhylafax/FaxRecvInfo.c++.orig      2012-06-06 02:58:38.000000000 +0200
++++ hylafax-6.0.6/libhylafax/FaxRecvInfo.c++   2018-04-16 19:01:56.584228628 +0200
+@@ -96,26 +96,27 @@
+     cp = strchr(cp+1, '"');
+     if (cp == NULL || cp[1] != ',' || cp[2] != '"')
+       return (false);
+-    passwd = cp+1;
++    passwd = cp+3;
+     passwd.resize(sender.next(0,'"'));
+-    cp = strchr(cp+1, '"');
++    cp = strchr(cp+3, '"');
+     if (cp == NULL || cp[1] != ',' || cp[2] != '"')
+       return (false);
+     subaddr = cp+3;                   // +1 for "/+1 for ,/+1 for "
+     subaddr.resize(subaddr.next(0,'"'));
+-    cp = strchr(cp+1, '"');
++    cp = strchr(cp+3, '"');
+     if (cp == NULL || cp[1] != ',' || cp[2] != '"')
+       return (false);
+     reason = cp+3;                    // +1 for "/+1 for ,/+1 for "
+     reason.resize(reason.next(0,'"'));
+-    cp = strchr(cp+1, '"');
++    cp = strchr(cp+3, '"');
+     if (cp == NULL || cp[1] != ',' || cp[2] != '"')
+       return (false);
+     u_int i = 0;
+-    while (cp+2 != '\0') {
++    while (cp[1] == ',' && cp[2] == '"') {
+       callid[i] = cp+3;               // +1 for "/+1 for ,/+1 for "
+-      if (*cp == '\"') break;
+       callid[i].resize(callid[i].next(0,'"'));
++      cp = strchr(cp+3, '"');
++      if (cp == NULL) break;
+       i++;
+     }
+     return (true);
index 77eedd517e86a77006ec88c33ff60234ef6b4792..f0b9a7b9ee6e333119d0d24aec1ce6f16f2838ed 100644 (file)
@@ -24,6 +24,7 @@ Patch1:               %{name}-topmargin.patch
 Patch2:                %{name}-pic.patch
 Patch3:                %{name}-awk.patch
 Patch4:                %{name}-format.patch
+Patch5:                %{name}-FaxRecvInfo.patch
 URL:           http://www.hylafax.org/
 BuildRequires: jbigkit-devel
 BuildRequires: libstdc++-devel
@@ -148,6 +149,7 @@ Ten pakiet zawiera bibliotekę współdzieloną HylaFAX.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %ifarch sparc64
 sed -i -e 's/-fpic/-fPIC/g' configure
@@ -157,7 +159,7 @@ sed -i -e 's/-fpic/-fPIC/g' configure
 # set dummy GCOPTS,GCXXOPTS to avoid adding "-g"
 # the configure is too stupid to keep spaces in CC/CXX, so strip ccache if any
 CC="%{__cc}"
-CCXX="%{__cxx}"
+CXX="%{__cxx}"
 CC=${CC#ccache } \
 CXX=${CXX#ccache } \
 GCOPTS=" " \
This page took 0.110488 seconds and 4 git commands to generate.