[fetchmail] stuff_warning() buffer overrun patch

Jason Tishler jason@tishler.net
Fri, 17 Jan 2003 08:43:42 -0500


---------------------- multipart/mixed attachment
The buffer used by stuff_warning() is too small to handle messages like
the following:

    The attempt to get authorization failed.  Since we have already
    succeeded in getting authorization for this connection, this is
    probably another failure mode (such as busy server) that fetchmail
    cannot distinguish because the server didn't send a useful error
    message.

    However, if you HAVE changed your account details since starting the
    fetchmail daemon, you need to stop the daemon, change your
    configuration of fetchmail, and then restart the daemon.

    The fetchmail daemon will continue running and attempt to connect at
    each cycle.  No future notifications will be sent until service is
    restored.

So, I get emails like the first attachment when the failure mode
corresponding to the above occurs.

The second attachment is one way to fix this problem.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

---------------------- multipart/mixed attachment
An embedded message was scrubbed...
From: 
Subject: fetchmail authentication failed on user@mailserver
Date: Fri, 17 Jan 2003 03:12:37 -0500 (EST)
Size: 3284
Url: http://lists.ccil.org/pipermail/fetchmail-friends/attachments/b257f497/attachment.eml

---------------------- multipart/mixed attachment
--- sink.c.orig	2003-01-17 08:18:24.000000000 -0500
+++ sink.c	2003-01-17 08:18:34.000000000 -0500
@@ -1463,7 +1463,7 @@ va_dcl
 #endif
 /* format and ship a warning message line by mail */
 {
-    char	buf[POPBUFSIZE];
+    char	buf[MSGBUFSIZE];
     va_list ap;
 
     /*

---------------------- multipart/mixed attachment--