Re: [exim] mac os x server 10.4 dn_expand crash

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Phil Pennock
Fecha:  
A: Patrick Milvich, exim-users
Asunto: Re: [exim] mac os x server 10.4 dn_expand crash
On 2008-08-19 at 10:29 -0700, Phil Pennock wrote:
> On 2008-08-19 at 11:06 -0600, Patrick Milvich wrote:
> > Has anyone else experienced this issue and/or have thoughts on my
> > solution?
>
> Not before, but I can confirm that this is repeatable (once I skip the
> smarthost for this domain ;) ).
>
> (Will test patch when not at work)


One of those domains has reduced the count of records. For another,
which is still problematic, I confirm that a patch as you describe keeps
Exim from crashing.

The problem with this patch though is that if the last record has the
lowest MX then it won't fall back.

I'm tired and not seeing a simple correct solution to work around this
bug at this time, eg perhps handling fall-back to TCP by treating the
result as truncated.

-Phil
Index: src/dns.c
===================================================================
RCS file: /repo/exim/exim-src/src/dns.c,v
retrieving revision 1.17
diff -p -u -r1.17 dns.c
--- src/dns.c    8 Jan 2007 10:50:18 -0000    1.17
+++ src/dns.c    20 Aug 2008 05:32:39 -0000
@@ -346,6 +346,13 @@ contains the number of RR records left. 


if (dnss->rrcount-- <= 0) return NULL;

+if (dnss->aptr >= dnsa->answer + dnsa->answerlen)
+ {
+ DEBUG(D_dns) debug_printf("DNS lookup goes past the end of the packet\n");
+ dnss->rrcount = 0;
+ return NULL;
+ }
+
/* If expanding the RR domain name fails, behave as if no more records
(something safe). */