aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-04-18 03:35:40 +0800
committerache <ache@FreeBSD.org>2000-04-18 03:35:40 +0800
commit6ffcda4f6d2b62d4271d92ae4622a6904c1796e9 (patch)
tree5def0ed92ab3d8fa572d0150957d2fe995c0e0d6 /mail
parentd3b87dbed90a761d46fbffe316eb5827dee3bcba (diff)
downloadfreebsd-ports-graphics-6ffcda4f6d2b62d4271d92ae4622a6904c1796e9.tar.gz
freebsd-ports-graphics-6ffcda4f6d2b62d4271d92ae4622a6904c1796e9.tar.zst
freebsd-ports-graphics-6ffcda4f6d2b62d4271d92ae4622a6904c1796e9.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.
Diffstat (limited to 'mail')
-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 a7a27f65699..a683dd4cefb 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 00000000000..e255bf9046f
--- /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);
+ }
+ }