From 22367a0d0236bfcc184bc686a9118ee0b6f7163c Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 19 Jan 2006 02:16:36 +0000 Subject: Fix segfault or bus error after bouncing a message. This bug was introduced into 6.3.0 when removing alloca(); it caused fetchmail to free random memory. Reported by Nathaniel W. Turner, Debian Bug#348747. svn path=/branches/BRANCH_6-3/; revision=4652 --- sink.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sink.c') diff --git a/sink.c b/sink.c index 532de189..765240ec 100644 --- a/sink.c +++ b/sink.c @@ -984,14 +984,19 @@ transient: #ifdef EXPLICIT_BOUNCE_ON_BAD_ADDRESS /* * This should not be necessary, because the SMTP listener itself - * should genrate a bounce for the bad address. + * should generate a bounce for the bad address. + * + * XXX FIXME 2006-01-19: is this comment true? I don't think + * it is, because the SMTP listener isn't required to accept bogus + * messages. There appears to be general SMTP<->MDA and + * responsibility confusion. */ if (*bad_addresses) send_bouncemail(ctl, msg, XMIT_RCPTBAD, "Some addresses were rejected by the MDA fetchmail forwards to.\r\n", *bad_addresses, from_responses); while (*bad_addresses) - free(from_responses[*--bad_addresses]); + free(from_responses[--*bad_addresses]); free(from_responses); #endif /* EXPLICIT_BOUNCE_ON_BAD_ADDRESS */ -- cgit v1.2.3