On 2018/04/13 09:31, Jasper Lievisse Adriaanse wrote:
> CVSROOT: /cvs
> Module name: ports
> Changes by: [email protected] 2018/04/13 09:31:12
>
> Modified files:
> comms/hylafax : Makefile
> multimedia/libmp4v2: Makefile
>
> Log message:
> fix build with clang6 by forcing c++03
>
> these ports play too much games or the original intent it too hard to
> decipher (yes, looking at you hylafax)
>
I am not 100% sure but I think that may be an actual bug in hylafax.
I was wondering about
--- libhylafax/FaxRecvInfo.c++.orig Thu Apr 12 08:40:28 2018
+++ libhylafax/FaxRecvInfo.c++ Thu Apr 12 08:45:56 2018
@@ -70,53 +70,53 @@ FaxRecvInfo::encode()
bool
FaxRecvInfo::decode(const char* cp)
{
char* np;
time = (u_int) strtoul(cp, &np, 16);
if (np == cp)
return (false);
npages = (u_short) strtoul(cp = np+1, &np, 16);
if (np == cp)
return (false);
params.decode((u_int) strtoul(cp = np+1, &np, 16));
if (np == cp)
return (false);
qfile = np+1;
qfile.resize(qfile.next(0,','));
cp = strchr(np+1, ',');
if (cp == NULL)
return (false);
commid = cp+1;
commid.resize(commid.next(0,','));
cp = strchr(cp+1, '"');
if (cp == NULL)
return (false);
sender = cp+1;
sender.resize(sender.next(0,'"'));
cp = strchr(cp+1, '"');
if (cp == NULL || cp[1] != ',' || cp[2] != '"')
return (false);
passwd = cp+1;
passwd.resize(sender.next(0,'"'));
cp = strchr(cp+1, '"');
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, '"');
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, '"');
if (cp == NULL || cp[1] != ',' || cp[2] != '"')
return (false);
u_int i = 0;
- while (cp+2 != '\0') {
+ while (cp[2] != '\0') {
callid[i] = cp+3; // +1 for "/+1 for ,/+1 for "
if (*cp == '\"') break;
callid[i].resize(callid[i].next(0,'"'));
i++;
}
return (true);
}