From owner-svn-src-head@freebsd.org Fri Mar 3 12:29:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 554E9CF3933; Fri, 3 Mar 2017 12:29:29 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1FEA412C4; Fri, 3 Mar 2017 12:29:28 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 406D78500; Fri, 3 Mar 2017 12:29:27 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id EDD024771; Fri, 3 Mar 2017 13:29:26 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308996 - head/lib/libfetch References: <201611221330.uAMDU7fg052989@repo.freebsd.org> <77B1B45A-D837-4853-B1E9-958D3B0DD519@lists.zabbadoz.net> Date: Fri, 03 Mar 2017 13:29:26 +0100 In-Reply-To: <77B1B45A-D837-4853-B1E9-958D3B0DD519@lists.zabbadoz.net> (Bjoern A. Zeeb's message of "Tue, 28 Feb 2017 18:03:24 +0000") Message-ID: <867f468rx5.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 12:29:29 -0000 "Bjoern A. Zeeb" writes: > Dag-Erling Sm=C3=B8rgrav 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