Re: [Exim] [bug report] [PATCH] segfault with ACL

Pàgina inicial
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
A: Edouard Boucher
CC: exim-users@exim.org
Assumpte: Re: [Exim] [bug report] [PATCH] segfault with ACL
On Sat, 26 Oct 2002, Edouard Boucher wrote:

> hi,
>
> I have changed the default configuration file just a bit this way :
> **in the main section:
>   acl_smtp_etrn = foo
>   acl_smtp_vrfy = foo
>   acl_smtp_rcpt = foo
> **in the acl section :
>   foo:
>     accept sender_domains = 127.0.0.1


Very bogus ;)
With this patch the acl will defer for etrn and rcpt, because
sender_domains is unknown (that's the behaviour that is excepted)

> exim segfault when I try to VRFY or ETRN, but not for RCPT.
>
> I am using exim 4.10 #21,
>
> it looks like in acl.c, on line 866, Ustrrchr(sender_address, '@') is called
> with sender_address == NULL


Yes, correct, the code looks like PH wanted to add the check, but forgot
it ;)

The following patch should fix it, it was made again the current snapshot,
but i think it will apply to exim4.10 too.

ciao

--- exim-snapshot/src/acl.c    Thu Aug 29 11:26:00 2002
+++ exim-snapshot.new/src/acl.c    Sat Oct 26 09:31:50 2002
@@ -891,6 +891,13 @@
     break;


     case ACLC_SENDER_DOMAINS:
+    if (sender_address == NULL)
+      {
+      *log_msgptr = string_sprintf("cannot test sender_domains after %s",
+        acl_wherenames[where]);
+      return ERROR;
+      }
+    else
       {
       uschar *sdomain = Ustrrchr(sender_address, '@');
       sdomain = (sdomain == NULL)? US"" : sdomain + 1;