From f13ab6a55c8a245ce1e8febbc1d7806eb047b7aa Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Mon, 17 Apr 2000 19:35:40 +0000 Subject: 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. --- mail/popper/files/patch-an | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 mail/popper/files/patch-an (limited to 'mail/popper/files/patch-an') 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); + } + } -- cgit v1.2.3