Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Mar 2017 13:29:26 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r308996 - head/lib/libfetch
Message-ID:  <867f468rx5.fsf@desk.des.no>
In-Reply-To: <77B1B45A-D837-4853-B1E9-958D3B0DD519@lists.zabbadoz.net> (Bjoern A. Zeeb's message of "Tue, 28 Feb 2017 18:03:24 %2B0000")
References:  <201611221330.uAMDU7fg052989@repo.freebsd.org> <77B1B45A-D837-4853-B1E9-958D3B0DD519@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
"Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> writes:
> Dag-Erling Sm=C3=B8rgrav <des@des.no> writes:
>> +	/* split address if necessary */
>> +	err =3D EAI_SYSTEM;
>> +	if ((sep =3D strchr(addr, ':')) !=3D NULL) {
>> +		len =3D snprintf(hbuf, sizeof(hbuf),
>> +		    "%.*s", (int)(sep - addr), addr);
> I believe this code is what broke
> 	fetch http://[::1]:6666/
> just to give an example;  and the printf traces will not reveal this
> but =E2=80=9Caddr=E2=80=9D at this point has no more addr:port in it give=
n the
> function arguments, right?

I think you're right, I'll look into it.  It means replacing strchr()
with a loop.  Is there a ticket for this bug, and if not, could you
please open one?

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867f468rx5.fsf>