From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Sep 1 00:20:16 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94BD616A4CE for ; Wed, 1 Sep 2004 00:20:16 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A51B43D48 for ; Wed, 1 Sep 2004 00:20:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i810KGFi040373 for ; Wed, 1 Sep 2004 00:20:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i810KG5J040341; Wed, 1 Sep 2004 00:20:16 GMT (envelope-from gnats) Resent-Date: Wed, 1 Sep 2004 00:20:16 GMT Resent-Message-Id: <200409010020.i810KG5J040341@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Seth Kingsley Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CE7716A4E0; Wed, 1 Sep 2004 00:12:43 +0000 (GMT) Received: from toxic.magnesium.net (toxic.magnesium.net [207.154.84.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id D56D943D31; Wed, 1 Sep 2004 00:12:42 +0000 (GMT) (envelope-from sethk@magnesium.net) Received: by toxic.magnesium.net (Postfix, from userid 1165) id B4C8CDA88A; Tue, 31 Aug 2004 17:12:42 -0700 (PDT) Message-Id: <20040901001242.B4C8CDA88A@toxic.magnesium.net> Date: Tue, 31 Aug 2004 17:12:42 -0700 (PDT) From: Seth Kingsley To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: adamw@FreeBSD.org Subject: ports/71213: [MAINTAINER PATCH]: sysutils/bpm fails to handle new INDEX file X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Seth Kingsley List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 00:20:16 -0000 >Number: 71213 >Category: ports >Synopsis: [MAINTAINER PATCH]: sysutils/bpm fails to handle new INDEX file >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Sep 01 00:20:16 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Seth Kingsley >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: System: FreeBSD toxic.magnesium.net 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Thu Jun 26 13:43:26 PDT 2003 natey@newtoxic.magnesium.net:/data/world/obj/data/world/src/sys/TOXIC i386 >Description: The recently comitted BPM port fails to handle the new INDEX file format, which has had several fields added to it. In addition, it reacts badly when parse errors occur on the INDEX file, resulting in double free()s. The patch below works around both of these problems until the next formal release. >How-To-Repeat: Run sysutils/bpm on a recent ports collection. >Fix: Index: Makefile =================================================================== RCS file: /stor/ncvs/ports/sysutils/bpm/Makefile,v retrieving revision 1.2 diff -u -d -p -r1.2 Makefile --- Makefile 24 Aug 2004 14:18:53 -0000 1.2 +++ Makefile 31 Aug 2004 02:14:19 -0000 @@ -7,6 +7,7 @@ PORTNAME= bpm PORTVERSION= 0.4.1b +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.meowfishies.com/code/bpm/ EXTRACT_SUFX= .tgz Index: files/patch-src::refresh.c =================================================================== RCS file: /stor/ncvs/ports/sysutils/bpm/files/patch-src::refresh.c,v retrieving revision 1.1 diff -u -d -p -r1.1 patch-src::refresh.c --- files/patch-src::refresh.c 24 Aug 2004 19:21:12 -0000 1.1 +++ files/patch-src::refresh.c 31 Aug 2004 02:13:53 -0000 @@ -1,7 +1,7 @@ ---- src/refresh.c.orig Tue Aug 24 15:18:57 2004 -+++ src/refresh.c Tue Aug 24 15:20:12 2004 +--- src/refresh.c.orig Mon Aug 23 19:40:08 2004 ++++ src/refresh.c Mon Aug 30 19:12:50 2004 @@ -62,7 +62,11 @@ - __RCSID("$Id: patch-src::refresh.c,v 1.1 2004/08/24 19:21:12 adamw Exp $"); + __RCSID("$Id: refresh.c,v 1.32 2004/08/24 02:40:08 sethk Exp $"); /* XXX use libinstall/lib.h */ +#if __FreeBSD_version >= 500036 @@ -12,3 +12,26 @@ #define INDEX_MAXLN 4096 #define DB_DIR "/var/db/pkg" #define ITER_BYTES (128 * 1024) +@@ -183,10 +187,12 @@ + if (*sp == '|') + ++i; + +- if (i != (PFIELD_NFIELD - 1)) ++ if (i < (PFIELD_NFIELD - 1)) + { + #ifdef DEBUG +- warnx("invalid number of fields"); ++ warnx("invalid number of fields (%d should be %d)", ++ i + 1, ++ PFIELD_NFIELD); + #endif /* DEBUG */ + return FALSE; + } +@@ -320,7 +326,6 @@ + + if (_refresh_index_parse(ln, portdp, rdp) != TRUE) + { +- _refresh_portfree(portdp); + #ifdef DEBUG + warnx("%s:%u: invalid format", INDEX_FN, rdp->rd_linec); + #endif /* DEBUG */ >Release-Note: >Audit-Trail: >Unformatted: