From owner-freebsd-ports Sun Feb 25 22:48:57 2001 Delivered-To: freebsd-ports@freebsd.org Received: from blizzard.sabbo.net (blizzard.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id 86F3337B684; Sun, 25 Feb 2001 22:48:49 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Received: from vic.sabbo.net (root@vic.sabbo.net [193.193.218.112]) by blizzard.sabbo.net (8.10.1/8.10.1) with ESMTP id f1Q6mjv20309; Mon, 26 Feb 2001 08:48:45 +0200 Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.11.2/8.11.2) with ESMTP id f1Q6mkS34826; Mon, 26 Feb 2001 08:48:46 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Message-ID: <3A99FC4E.B825CB6B@FreeBSD.org> Date: Mon, 26 Feb 2001 08:48:46 +0200 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: Garrett Rooney Cc: ports@FreeBSD.org, jhk@FreeBSD.org, gad@FreeBSD.org, reg@FreeBSD.org Subject: Re: [patch] which package functionality for pkg_info References: <20010225161633.C94657@electricjellyfish.net> <200102252125.f1PLPH132145@vic.sabbo.net> <20010225192632.C37487@electricjellyfish.net> <20010225200351.A48200@electricjellyfish.net> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Garrett Rooney wrote: > amazing how you find stupid bugs the minute you send off the email with the > patch in it ;-) > > this version actually produces the correct output when there are files in the > plist that have the same beginning as the target, but a different end. Looks better now, however there are several placed when something like the following is used: len1 = strlen(str1); len2 = strlen(str2); tmp = calloc(len1 + len2 + 2, sizeof(char)); if (tmp == NULL) bah!(); sprintf(tmp, "%s/%s", str1, str2); Please replace the whole mess with: asprintf(&tmp, "%s/%s", str1, str2); if (tmp == NULL) bah!(); -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message