From owner-freebsd-current@FreeBSD.ORG Tue Aug 24 20:50:52 2004 Return-Path: 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 A35AE16A4DA for ; Tue, 24 Aug 2004 20:50:52 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id E37A143D1F for ; Tue, 24 Aug 2004 20:50:50 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b195.otenet.gr [212.205.244.203]) i7OKojXr026330; Tue, 24 Aug 2004 23:50:48 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i7OKnIe0003372; Tue, 24 Aug 2004 23:49:18 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i7OKnHVD003371; Tue, 24 Aug 2004 23:49:18 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 24 Aug 2004 23:49:17 +0300 From: Giorgos Keramidas To: Sean McNeil Message-ID: <20040824204917.GA3348@gothmog.gr> References: <1092777586.92327.9.camel@server.mcneil.com> <1093369220.10362.6.camel@server.mcneil.com> <20040824200225.V517@beagle.kn.op.dlr.de> <1093371600.10464.23.camel@server.mcneil.com> <20040824205417.L517@beagle.kn.op.dlr.de> <1093377802.43728.11.camel@server.mcneil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1093377802.43728.11.camel@server.mcneil.com> Phone: +30-2610-312145 Mobile: +30-6944-116520 X-Mailman-Approved-At: Wed, 25 Aug 2004 11:41:50 +0000 cc: current@freebsd.org Subject: Re: bsdtar core dumps X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 20:50:52 -0000 Hi Sean, Does the patch below also solve the problems with tar you were experiencing? On 2004-08-24 13:03, Sean McNeil wrote: > *** lib/libarchive/archive_string_sprintf.c.orig Fri Aug 13 > 20:45:45 2004--- lib/libarchive/archive_string_sprintf.c Tue Aug 24 > 12:58:24 2004 > *************** __archive_string_vsprintf(struct archive > *** 47,65 **** > va_list ap) > { > size_t l; > > if (fmt == NULL) { > as->s[0] = 0; > return; > } > > l = vsnprintf(as->s, as->buffer_length, fmt, ap); > /* If output is bigger than the buffer, resize and try again. */ > if (l+1 >= as->buffer_length) { > __archive_string_ensure(as, l + 1); > ! l = vsnprintf(as->s, as->buffer_length, fmt, ap); > } > as->length = l; > } > > /* > --- 47,68 ---- > va_list ap) > { > size_t l; > + va_list ap1; > > if (fmt == NULL) { > as->s[0] = 0; > return; > } > > + va_copy(ap1,ap); > l = vsnprintf(as->s, as->buffer_length, fmt, ap); > /* If output is bigger than the buffer, resize and try again. */ > if (l+1 >= as->buffer_length) { > __archive_string_ensure(as, l + 1); > ! l = vsnprintf(as->s, as->buffer_length, fmt, ap1); > } > as->length = l; > + va_end(ap1); > } > > /* > > *** lib/libc/stdio/vfprintf.c.orig Mon Aug 23 20:35:43 2004 > --- lib/libc/stdio/vfprintf.c Tue Aug 24 13:01:45 2004 > *************** error: > *** 1237,1242 **** > --- 1237,1243 ---- > if (dtoaresult != NULL) > freedtoa(dtoaresult); > #endif > + va_end(orgap); > if (convbuf != NULL) > free(convbuf); > if (__sferror(fp)) >