From owner-freebsd-current Sun Oct 27 19:38:25 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BA0237B401; Sun, 27 Oct 2002 19:38:24 -0800 (PST) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [24.61.41.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96B9F43E3B; Sun, 27 Oct 2002 19:38:23 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.6/8.12.5) with ESMTP id g9S3cbRD051816; Sun, 27 Oct 2002 22:38:37 -0500 (EST) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id g9S3caTb051815; Sun, 27 Oct 2002 22:38:36 -0500 (EST) Date: Sun, 27 Oct 2002 22:38:36 -0500 From: Craig Rodrigues To: Manfred Antar Cc: current@freebsd.org, des@freebsd.org Subject: Re: Latest fetch on current broken Message-ID: <20021027223836.A51789@attbi.com> References: <5.1.1.6.2.20021027153430.00a796a8@pozo.com> <5.1.1.6.2.20021027153430.00a796a8@pozo.com> <20021027212702.A51436@attbi.com> <5.1.1.6.2.20021027183013.00abaec0@pozo.com> <20021027222102.A51684@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021027222102.A51684@attbi.com>; from rodrigc@attbi.com on Sun, Oct 27, 2002 at 10:21:02PM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Oct 27, 2002 at 10:21:02PM -0500, Craig Rodrigues wrote: > On Sun, Oct 27, 2002 at 06:31:27PM -0800, Manfred Antar wrote: > > I noticed it when doing a portupgrade cdrtools > > So yes anything that uses fetch is not going to work > > OK, I started tracing this down. > > Here's how to get debugging versions: > cd /usr/src/lib/libfetch > make clean > make DEBUG_FLAGS=-g > make DEBUG_FLAGS=-g install > > cd /usr/src/usr.bin/fetch > make clean > make DEBUG_FLAGS=-g NOSHARED=yes > make DEBUG_FLAGS=-g NOSHARED=yes install I tracked this down further to the _fetch_writev() function in libfetch/common.c. Try this patch: --- lib/libfetch/common.c.orig Sun Oct 27 22:38:16 2002 +++ lib/libfetch/common.c Sun Oct 27 22:40:12 2002 @@ -525,7 +525,7 @@ return (-1); } total += wlen; - while (iovcnt > 0 && wlen > iov->iov_len) { + while (iovcnt > 0 && wlen >= iov->iov_len) { wlen -= iov->iov_len; iov++; iovcnt--; -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message