From: Philip Hazel Date: Thu, 23 Jun 2005 10:02:13 +0000 (+0000) Subject: Fix crash when callout to an address routed by a verify_only router with X-Git-Tag: exim-4_52~29 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/5417f6d1692158318d419c8931bfe34e53d87f36 Fix crash when callout to an address routed by a verify_only router with no transport. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 14741664e..472182980 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.169 2005/06/22 15:44:37 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.170 2005/06/23 10:02:13 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -187,6 +187,13 @@ PH/26 Insert a lot of missing (void) casts for functions such as chown(), for this - only an attribute that has to be put on the function's prototype. I'm sure I haven't caught all of these, but it's a start. +PH/27 If a dnslookup or manualroute router is set with verify=only, it need not + specify a transport. However, if an address that was verified by such a + router was the subject of a callout, Exim crashed because it tried to + read the rcpt_include_affixes from the non-existent transport. Now it + just assumes that the setting of that option is false. This bug was + introduced by 4.51/PH/31. + Exim version 4.51 ----------------- diff --git a/src/src/verify.c b/src/src/verify.c index cdf5bb78d..9d99c69cd 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/verify.c,v 1.20 2005/06/22 10:17:23 ph10 Exp $ */ +/* $Cambridge: exim/src/src/verify.c,v 1.21 2005/06/23 10:02:13 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -550,10 +550,14 @@ for (host = host_list; host != NULL && !done; host = host->next) if (new_domain_record.random_result != ccache_accept && done) { + /* Get the rcpt_include_affixes flag from the transport if there is one, + but assume FALSE if there is not. */ + done = smtp_write_command(&outblock, FALSE, "RCPT TO:<%.1000s>\r\n", transport_rcpt_address(addr, - addr->transport->rcpt_include_affixes)) >= 0 && + (addr->transport == NULL)? FALSE : + addr->transport->rcpt_include_affixes)) >= 0 && smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout);