diff options
author | adamw <adamw@FreeBSD.org> | 2004-09-01 09:40:34 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2004-09-01 09:40:34 +0800 |
commit | 7678455634ed9b0d03a852f1a9abb7140a3e8285 (patch) | |
tree | 11340c09f2f7dfbfb0933e59d51d663afb69a05c /ports-mgmt/bpm | |
parent | 525507865ff007f9d17590861056406af7f4a686 (diff) | |
download | freebsd-ports-gnome-7678455634ed9b0d03a852f1a9abb7140a3e8285.tar.gz freebsd-ports-gnome-7678455634ed9b0d03a852f1a9abb7140a3e8285.tar.zst freebsd-ports-gnome-7678455634ed9b0d03a852f1a9abb7140a3e8285.zip |
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
Diffstat (limited to 'ports-mgmt/bpm')
-rw-r--r-- | ports-mgmt/bpm/Makefile | 1 | ||||
-rw-r--r-- | ports-mgmt/bpm/files/patch-src::refresh.c | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/ports-mgmt/bpm/Makefile b/ports-mgmt/bpm/Makefile index b1166e268c1c..49448c85e5f0 100644 --- a/ports-mgmt/bpm/Makefile +++ b/ports-mgmt/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/ports-mgmt/bpm/files/patch-src::refresh.c b/ports-mgmt/bpm/files/patch-src::refresh.c index b96fa00ecd8d..03b9c059749b 100644 --- a/ports-mgmt/bpm/files/patch-src::refresh.c +++ b/ports-mgmt/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 */ |