ports/68455: [MAINTAINER] mail/bogofilter: fix two bugs
Matthias Andree
matthias.andree at gmx.de
Mon Jun 28 20:10:29 UTC 2004
>Number: 68455
>Category: ports
>Synopsis: [MAINTAINER] mail/bogofilter: fix two bugs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 28 20:10:29 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Matthias Andree
>Release: FreeBSD 4.10-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD libertas.emma.line.org 4.10-RELEASE-p1 FreeBSD 4.10-RELEASE-p1 #1: Mon Jun 28 02:56:27 CEST 2004
>Description:
- Add a ChangeLog.port file
- fix SIGSEGV (NULL dereferenced pointer read) when %I is used
and no IP address had been found (reported by Clemens Fischer, Bcc'd)
- fix data base shutdown in multiple-wordlists mode
when BOGOFILTER_CONCURRENT_DATA_STORE is set in the environment
Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:
--- bogofilter-0.92.0_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/Makefile /root/ports/mail/bogofilter/Makefile
--- /usr/ports/mail/bogofilter/Makefile Mon Jun 28 17:04:10 2004
+++ /root/ports/mail/bogofilter/Makefile Mon Jun 28 22:00:25 2004
@@ -7,7 +7,7 @@
PORTNAME= bogofilter
PORTVERSION= 0.92.0
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES?= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -105,6 +105,7 @@
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCSDIR}/html
${INSTALL_DATA} ${WRKSRC}/doc/*.xml ${DOCSDIR}/xml
${INSTALL_DATA} ${WRKSRC}/doc/programmer/README.freebsd ${DOCSDIR}/programmer
+ ${INSTALL_DATA} ${FILESDIR}/ChangeLog.port ${DOCSDIR}
.endif
.if !defined(WITHOUT_BASH)
.for i in randomtrain scramble trainbogo.sh
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/files/ChangeLog.port /root/ports/mail/bogofilter/files/ChangeLog.port
--- /usr/ports/mail/bogofilter/files/ChangeLog.port Thu Jan 1 01:00:00 1970
+++ /root/ports/mail/bogofilter/files/ChangeLog.port Mon Jun 28 21:57:29 2004
@@ -0,0 +1,13 @@
+FreeBSD's port ChangeLog for mail/bogofilter
+------------------------
+
+0.92.0_1
+- fix SIGSEGV (NULL dereferenced pointer read) when %I is used
+ and no IP address had been found (reported by Clemens Fischer)
+- fix data base shutdown in multiple-wordlists mode
+ when BOGOFILTER_CONCURRENT_DATA_STORE is set in the environment
+
+0.92.0
+- update to next stable release 0.92.0
+
+-- Matthias Andree <matthias.andree at gmx.de>, port maintainer
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/files/patch-aa /root/ports/mail/bogofilter/files/patch-aa
--- /usr/ports/mail/bogofilter/files/patch-aa Thu Jan 1 01:00:00 1970
+++ /root/ports/mail/bogofilter/files/patch-aa Mon Jun 28 17:48:04 2004
@@ -0,0 +1,172 @@
+--- ./src/datastore.c 19 Jun 2004 19:17:56 -0000 1.44
++++ ./src/datastore.c 28 Jun 2004 01:43:29 -0000 1.45
+@@ -323,6 +323,7 @@
+
+ void ds_init()
+ {
++ db_init();
+ if (msg_count_tok == NULL) {
+ msg_count_tok = word_new((const byte *)MSG_COUNT, strlen(MSG_COUNT));
+ }
+@@ -334,6 +335,7 @@
+ /* Cleanup storage allocation */
+ void ds_cleanup()
+ {
++ db_cleanup();
+ xfree(msg_count_tok);
+ xfree(wordlist_version_tok);
+ msg_count_tok = NULL;
+
+--- ./src/datastore_db.c 19 Jun 2004 19:17:56 -0000 1.107
++++ ./src/datastore_db.c 28 Jun 2004 01:43:29 -0000 1.108
+@@ -70,9 +70,6 @@
+ /* dummy infrastructure, to be expanded by environment
+ * or transactional initialization/shutdown */
+
+-static int db_init(void);
+-static void db_cleanup(void);
+-
+ /* Function definitions */
+
+ /** translate BerkeleyDB \a flags bitfield back to symbols */
+@@ -285,10 +282,6 @@
+ size_t idx;
+ uint32_t retryflags[] = { 0, DB_NOMMAP };
+
+- db_init();
+-
+- if (!init) abort();
+-
+ check_db_version();
+
+ if (open_mode & DS_READ )
+@@ -574,8 +567,6 @@
+ print_error(__FILE__, __LINE__, "(db) db_close err: %d, %s", ret, db_strerror(ret));
+
+ dbh_free(handle);
+-
+- db_cleanup();
+ }
+
+
+@@ -671,7 +662,7 @@
+ /* dummy infrastructure, to be expanded by environment
+ * or transactional initialization/shutdown */
+
+-static int db_init(void) {
++int db_init(void) {
+ char *t;
+ int cdb_alldb = 1;
+
+@@ -705,7 +696,7 @@
+ return 0;
+ }
+
+-static void db_cleanup(void) {
++void db_cleanup(void) {
+ if (!init)
+ return;
+ if (dbe)
+
+--- ./src/datastore_db.h 19 Jun 2004 19:17:56 -0000 1.12
++++ ./src/datastore_db.h 28 Jun 2004 01:43:30 -0000 1.13
+@@ -81,6 +81,9 @@
+ /* Returns created flag */
+ bool db_created(void *vhandle);
+
++int db_init(void);
++void db_cleanup(void);
++
+ /* This is not currently used ...
+ *
+ #define db_write_lock(fd) db_lock(fd, F_SETLKW, F_WRLCK)
+
+--- ./src/datastore_qdbm.c 19 Jun 2004 19:17:56 -0000 1.27
++++ ./src/datastore_qdbm.c 28 Jun 2004 01:43:30 -0000 1.28
+@@ -47,8 +47,6 @@
+ * or transactional initialization/shutdown */
+
+ static bool init = false;
+-static int db_init(void) { init = true; return 0; }
+-static void db_cleanup(void) { init = false; }
+
+ /* Function definitions */
+
+@@ -128,8 +126,6 @@
+
+ if (handle == NULL) return NULL;
+
+- db_init();
+-
+ dbp = handle->dbp = dpopen(handle->name, open_flags, DB_INITBNUM);
+
+ if ((dbp == NULL) && (open_mode & DS_WRITE)) {
+@@ -276,8 +272,6 @@
+ handle->dbp = NULL;
+
+ dbh_free(handle);
+-
+- db_cleanup();
+ }
+
+
+@@ -344,3 +338,14 @@
+ const char *db_str_err(int e) {
+ return dperrmsg(e);
+ }
++
++int db_init(void)
++{
++ init = true;
++ return 0;
++}
++
++void db_cleanup(void)
++{
++ init = false;
++}
+
+--- ./src/datastore_tdb.c 19 Jun 2004 19:17:56 -0000 1.29
++++ ./src/datastore_tdb.c 28 Jun 2004 01:43:30 -0000 1.30
+@@ -37,8 +37,6 @@
+ * or transactional initialization/shutdown */
+
+ static bool init = false;
+-static int db_init(void) { init = true; return 0; }
+-static void db_cleanup(void) { init = false; }
+
+ /* Function definitions */
+
+@@ -119,8 +117,6 @@
+
+ if (handle == NULL) return NULL;
+
+- db_init();
+-
+ dbp = handle->dbp = tdb_open(handle->name, 0, tdb_flags, open_flags, 0664);
+
+ if ((dbp == NULL) && (open_mode & DS_WRITE)) {
+@@ -258,8 +254,6 @@
+ }
+
+ dbh_free(handle);
+-
+- db_cleanup();
+ }
+
+ /*
+@@ -358,3 +352,14 @@
+ return emap[i].estring;
+ return "Invalid error code";
+ }
++
++int db_init(void)
++{
++ init = true;
++ return 0;
++}
++
++void db_cleanup(void)
++{
++ init = false;
++}
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/files/patch-ab /root/ports/mail/bogofilter/files/patch-ab
--- /usr/ports/mail/bogofilter/files/patch-ab Thu Jan 1 01:00:00 1970
+++ /root/ports/mail/bogofilter/files/patch-ab Mon Jun 28 21:52:00 2004
@@ -0,0 +1,11 @@
+--- ./src/format.c 14 Jun 2004 23:45:44 -0000 1.37
++++ ./src/format.c 28 Jun 2004 19:45:17 -0000
+@@ -357,7 +357,7 @@
+ buff += format_string(buff, spam_header_name, 0, prec, flags, end);
+ break;
+ case 'I': /* I - received IP address */
+- buff += format_string(buff, ipaddr->text, 0, prec, flags, end);
++ buff += format_string(buff, ipaddr ? (const char *)ipaddr->text : "UNKNOWN", 0, prec, flags, end);
+ break;
+ case 'l': /* l - logging tag */
+ buff += format_string(buff, logtag, 0, prec, flags, end);
--- bogofilter-0.92.0_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list