--- /dev/null
+--- 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);
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
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%ifarch sparc64
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=" " \