fetchmail-friends
[Top] [All Lists]

[fetchmail]Fetchmail 5.9.4: bugs in sink.c prevent proper retrieval of mail

2001-10-03 16:54:02
In 5.9.4, open_sink() calls one of open_bsmtp_sink(), open_smtp_sink(), or
open_mda_sink().

However, in the case of open_smtp_sink() and open_mda_sink(), the routines
can return without explicitly returning a status value (e.g. PS_SUCCESS), so
whatever garbage is on the stack is returned to the caller of open_sink() as
its status.  Since any non-zero value is determined to be an error, this causes
retrieval of mail to fail since a false "error" is detected by fetch_messages().

A patch follows...

                                        William Kucharski
                                        
william(_dot_)kucharski(_at_)sun(_dot_)com

==================================[ Cut Here ]==================================

*** sink.c.orig Wed Oct  3 17:35:54 2001
--- sink.c      Wed Oct  3 17:41:34 2001
***************
*** 793,798 ****
--- 793,800 ----
        SMTP_rset(ctl->smtp_socket);    /* stay on the safe side */
        return(handle_smtp_report(ctl, msg));
      }
+ 
+     return(PS_SUCCESS);
  }
  
  static int open_mda_sink(struct query *ctl, struct msgblk *msg,
***************
*** 958,963 ****
--- 960,967 ----
      sa_new.sa_handler = SIG_DFL;
      sigaction (SIGCHLD, &sa_new, NULL);
  #endif /* HAVE_SIGACTION */
+ 
+     return(PS_SUCCESS);
  }
  
  int open_sink(struct query *ctl, struct msgblk *msg,


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]Fetchmail 5.9.4: bugs in sink.c prevent proper retrieval of mail, William Kucharski <=