aboutsummaryrefslogtreecommitdiffstats
path: root/mail/popd
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2009-06-24 07:39:18 +0800
committerpgollucci <pgollucci@FreeBSD.org>2009-06-24 07:39:18 +0800
commit9ecbcdab78fec6c7a350e0ee982c3811b5e51eea (patch)
treed67706cc8c4326a737baa332084eb57c1a9f5935 /mail/popd
parentf7745dc91e372c708981fd6feb24f0f4bcac14a7 (diff)
downloadfreebsd-ports-gnome-9ecbcdab78fec6c7a350e0ee982c3811b5e51eea.tar.gz
freebsd-ports-gnome-9ecbcdab78fec6c7a350e0ee982c3811b5e51eea.tar.zst
freebsd-ports-gnome-9ecbcdab78fec6c7a350e0ee982c3811b5e51eea.zip
- Fix a null pointer exception
(asked submitted to send this patch upstream) PR: ports/134721 Submitted by: Dmitry <hanabana@mail.ru> Approved by: maintainer timeout (ian@freislich.nom.za; 1.5 months)
Diffstat (limited to 'mail/popd')
-rw-r--r--mail/popd/Makefile2
-rw-r--r--mail/popd/files/patch-lib__mbox_mbf.c30
-rw-r--r--mail/popd/files/patch-lib__private.h12
-rw-r--r--mail/popd/files/patch-src__config.h10
4 files changed, 53 insertions, 1 deletions
diff --git a/mail/popd/Makefile b/mail/popd/Makefile
index 569997eaa8b8..516eeef5056c 100644
--- a/mail/popd/Makefile
+++ b/mail/popd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= popd
PORTVERSION= 2.2.2a
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= mail
MASTER_SITES= ftp://ftp3.za.freebsd.org/pub/popd/
diff --git a/mail/popd/files/patch-lib__mbox_mbf.c b/mail/popd/files/patch-lib__mbox_mbf.c
new file mode 100644
index 000000000000..4387691da88a
--- /dev/null
+++ b/mail/popd/files/patch-lib__mbox_mbf.c
@@ -0,0 +1,30 @@
+--- ./lib/mbox_mbf.c.orig 2003-03-05 02:33:12.000000000 -0500
++++ ./lib/mbox_mbf.c 2009-06-23 19:35:15.499808776 -0400
+@@ -151,7 +151,10 @@
+ bytes -= len;
+ offset += len;
+ q[buffleft] = '\0';
+- p = strchr(buffer, '\n');
++ if ((p = strchr(buffer, '\n')) == NULL) {
++ p = q + buffleft;
++ continue;
++ }
+ }
+ *p++ = '\0';
+ if (*line == '\0') {
+@@ -382,7 +385,14 @@
+ len = read(mbox->fd, offset, buffleft);
+ bytes -= len;
+ offset[len] = '\0';
+- p = strchr(buffer, '\n');
++ if ((p = strchr(buffer, '\n')) == NULL) {
++ p = offset + len;
++ if( (p - buffer) == 1 && buffer[0] == '.' )
++ sendline(SEND_BUF, "..");
++ else
++ sendline(SEND_BUF, "%s", buffer);
++ continue;
++ }
+ }
+ *p++ = '\0';
+ if (line[0] == '.' && line[1] == '\0') {
diff --git a/mail/popd/files/patch-lib__private.h b/mail/popd/files/patch-lib__private.h
new file mode 100644
index 000000000000..e51952619a36
--- /dev/null
+++ b/mail/popd/files/patch-lib__private.h
@@ -0,0 +1,12 @@
+--- ./lib/private.h.orig 2001-10-10 05:48:11.000000000 -0400
++++ ./lib/private.h 2009-06-23 19:35:15.499808776 -0400
+@@ -26,6 +26,9 @@
+ * $Id: private.h,v 1.1 2001/10/10 09:48:11 ianf Exp $
+ */
+
++#undef NULL
++#define NULL 0
++
+ #define TRUE 1
+ #define FALSE 0
+ #define MAXINCR 20
diff --git a/mail/popd/files/patch-src__config.h b/mail/popd/files/patch-src__config.h
new file mode 100644
index 000000000000..d5addfaa55d5
--- /dev/null
+++ b/mail/popd/files/patch-src__config.h
@@ -0,0 +1,10 @@
+--- ./src/config.h.orig 2002-11-20 05:27:49.000000000 -0500
++++ ./src/config.h 2009-06-23 19:35:15.500808903 -0400
+@@ -26,6 +26,7 @@
+ * $Id: config.h,v 1.20 2002/11/20 10:27:49 ianf Exp $
+ */
+
++#undef NULL
+ #define NULL 0
+ #define TRUE 1
+ #define FALSE 0