[1117] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

movemail-mmdf fix

daemon@ATHENA.MIT.EDU (John Rousseau)
Mon Mar 6 13:59:07 1995

Date: Mon, 6 Mar 1995 13:58:44 -0500
From: John Rousseau <jrr@apollo.hp.com>
To: krb5-bugs@MIT.EDU
Cc: brezak@apollo.hp.com

Due to a buffer overrun problem in appl/pop/movemail-mmdf.c,
I changed the size of the all the buffers used for
communicating with the POP daemon.

This is the exact same set of changes that we made to
appl/pop/movemail.c, and sent in a while ago.

This problem manifests itself by having blank lines inserted
in a message after really long lines (>128 bytes). This was
most often seen in mail headers with long Received: lines.

Context diff follows.

-John

-----------------------------------------------------------
John Rousseau, NREMT-P          Internet: jrr@apollo.hp.com
Hewlett-Packard                      Voice: +1 508 436 4284
300 Apollo Drive                       Fax: +1 508 436 5140
Chelmsford, MA 01824                                       
MS: CHR-03-DC                PGP key available upon request
-----------------------------------------------------------

diff -c OLD NEW

*** /vob/krb5/src/appl/pop/movemail/movemail-mmdf.c@@/main/HP_BETA4/1	Fri Jul 15 08:41:12 1994
--- /vob/krb5/src/appl/pop/movemail/movemail-mmdf.c@@/main/HP_BETA4/2	Mon Mar  6 13:47:41 1995
***************
*** 382,388 ****
  {
      char *host;
      int nmsgs, nbytes;
!     char response[128];
      register int i;
      int mbfi;
      FILE *mbf;
--- 382,388 ----
  {
      char *host;
      int nmsgs, nbytes;
!     char response[1024];
      register int i;
      int mbfi;
      FILE *mbf;
***************
*** 634,640 ****
  pop_command(fmt, a, b, c, d)
  char *fmt;
  {
!     char buf[128];
  
      sprintf(buf, fmt, a, b, c, d);
  
--- 634,640 ----
  pop_command(fmt, a, b, c, d)
  char *fmt;
  {
!     char buf[1024];
  
      sprintf(buf, fmt, a, b, c, d);
  
***************
*** 659,665 ****
  pop_stat(nmsgs, nbytes)
  int *nmsgs, *nbytes;
  {
!     char buf[128];
  
      if (debug) fprintf(stderr, "---> STAT\n");
      if (putline("STAT", Errmsg, sfo) == NOTOK) return(NOTOK);
--- 659,665 ----
  pop_stat(nmsgs, nbytes)
  int *nmsgs, *nbytes;
  {
!     char buf[1024];
  
      if (debug) fprintf(stderr, "---> STAT\n");
      if (putline("STAT", Errmsg, sfo) == NOTOK) return(NOTOK);
***************
*** 682,688 ****
  pop_retr(msgno, action, arg)
  int (*action)();
  {
!     char buf[128];
  
      sprintf(buf, "RETR %d", msgno);
      if (debug) fprintf(stderr, "%s\n", buf);
--- 682,688 ----
  pop_retr(msgno, action, arg)
  int (*action)();
  {
!     char buf[1024];
  
      sprintf(buf, "RETR %d", msgno);
      if (debug) fprintf(stderr, "%s\n", buf);

home help back first fref pref prev next nref lref last post