summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2004-09-01 01:40:34 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2004-09-01 01:40:34 +0000
commitb53f2958fef06605ab6547a7921008a5d0d78f84 (patch)
treed926d254fde1d9c8a41adfc09da2fe91e44d7916 /sysutils
parentAdd patch files which for some reason "pcvs add" did not, the first time. (diff)
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 works around both of these problems until the next formal release. PR: ports/71213 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=117776
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bpm/Makefile1
-rw-r--r--sysutils/bpm/files/patch-src::refresh.c23
2 files changed, 24 insertions, 0 deletions
diff --git a/sysutils/bpm/Makefile b/sysutils/bpm/Makefile
index b1166e268c1c..49448c85e5f0 100644
--- a/sysutils/bpm/Makefile
+++ b/sysutils/bpm/Makefile
@@ -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
diff --git a/sysutils/bpm/files/patch-src::refresh.c b/sysutils/bpm/files/patch-src::refresh.c
index b96fa00ecd8d..03b9c059749b 100644
--- a/sysutils/bpm/files/patch-src::refresh.c
+++ b/sysutils/bpm/files/patch-src::refresh.c
@@ -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 */