aboutsummaryrefslogtreecommitdiff
path: root/mail/popper
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-04-17 19:35:40 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-04-17 19:35:40 +0000
commitf13ab6a55c8a245ce1e8febbc1d7806eb047b7aa (patch)
tree995a481f10803e2be279efd5305a35cc49bd208e /mail/popper
parent11ea90b23b53818cbe08fb002c76320c59b502af (diff)
downloadports-f13ab6a55c8a245ce1e8febbc1d7806eb047b7aa.tar.gz
ports-f13ab6a55c8a245ce1e8febbc1d7806eb047b7aa.zip
1) Popper always assume that fgets got whole line, so it is easy to make
fake headers by special long lines aligned to buffer boundary - popper treat them as separate lines. Whole code needs rewriting. As workaround increase MAXLINE to the value sendmail use, hoping sendmail itself not makes longer lines. 2) Fix EUIDL responses not properly \n terminated.
Notes
Notes: svn path=/head/; revision=27701
Diffstat (limited to 'mail/popper')
-rw-r--r--mail/popper/files/patch-ak38
-rw-r--r--mail/popper/files/patch-an28
2 files changed, 47 insertions, 19 deletions
diff --git a/mail/popper/files/patch-ak b/mail/popper/files/patch-ak
index a7a27f656993..a683dd4cefb5 100644
--- a/mail/popper/files/patch-ak
+++ b/mail/popper/files/patch-ak
@@ -1,19 +1,19 @@
-*** popper.h.old Sun Jun 28 12:58:15 1998
---- popper.h Sun Jun 28 11:56:10 1998
-***************
-*** 59,65 ****
- #define MAXMSGLINELEN MAXLINELEN
- #define MAXCMDLEN 4
- #define MAXPARMCOUNT 5
-! #define MAXPARMLEN 10
- #define ALLOC_MSGS 20
-
- #ifndef OSF1
---- 59,65 ----
- #define MAXMSGLINELEN MAXLINELEN
- #define MAXCMDLEN 4
- #define MAXPARMCOUNT 5
-! #define MAXPARMLEN 32 /* Large enough for 32-byte APOP parm. */
- #define ALLOC_MSGS 20
-
- #ifndef OSF1
+--- popper.h.orig Mon Apr 17 22:33:43 2000
++++ popper.h Mon Apr 17 22:50:27 2000
+@@ -55,11 +55,14 @@
+
+ #define MAXUSERNAMELEN 65
+ #define MAXDROPLEN 64
+-#define MAXLINELEN 1024
++/* This program always assume that fgets return whole line,
++ so the buffer must be at least one char bigger than sendmail
++ use, because of >From */
++#define MAXLINELEN (2048+1)
+ #define MAXMSGLINELEN MAXLINELEN
+ #define MAXCMDLEN 4
+ #define MAXPARMCOUNT 5
+-#define MAXPARMLEN 10
++#define MAXPARMLEN 32 /* Large enough for 32-byte APOP parm. */
+ #define ALLOC_MSGS 20
+
+ #ifndef OSF1
diff --git a/mail/popper/files/patch-an b/mail/popper/files/patch-an
new file mode 100644
index 000000000000..e255bf9046f5
--- /dev/null
+++ b/mail/popper/files/patch-an
@@ -0,0 +1,28 @@
+--- pop_uidl.c.old Fri Jul 10 03:44:08 1998
++++ pop_uidl.c Mon Apr 17 22:56:13 2000
+@@ -98,6 +98,7 @@
+ {
+ static char buf[MAXLINELEN];
+ char *cp;
++ char *bp;
+
+ fseek(p->drop, mp->offset, 0);
+ while (fgets(buf, sizeof(buf), p->drop) != NULL) {
+@@ -105,6 +106,8 @@
+ if (!strncasecmp("From:", buf, 5)) {
+ cp = index(buf, ':');
+ while (*++cp && (*cp == ' ' || *cp == '\t'));
++ if ((bp = index(cp, NEWLINE)) != NULL)
++ *bp = 0;
+ return(cp);
+ }
+ }
+@@ -165,7 +168,7 @@
+
+ sprintf(buffer, "%d %s", x, mp->uidl_str);
+ if (nl = index(buffer, NEWLINE)) *nl = 0;
+- sprintf(buffer, "%s %d %.128s", buffer, mp->length, from_hdr(p, mp));
++ sprintf(buffer, "%s %d %.128s\n", buffer, mp->length, from_hdr(p, mp));
+ pop_sendline(p, buffer);
+ }
+ }