ports/71213: [MAINTAINER PATCH]: sysutils/bpm fails to handle new INDEX file

Seth Kingsley sethk at meowfishies.com
Wed Sep 1 00:20:16 UTC 2004


>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 at 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:



More information about the freebsd-ports-bugs mailing list