Re: [exim-dev] Segmentation fault in check_address()

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Daniel Tiefnig
CC: exim-dev
Assumpte: Re: [exim-dev] Segmentation fault in check_address()
On Wed, 2 Nov 2005, Daniel Tiefnig wrote:

> ${if match_address{1.2.3.4}{1.2.3.4} {foo}{bar}}


Oops.

> Looking at check_address() in match.c, one finds out the problem is the
> "uschar *sdomain", which gets initialized at line 994:
>     sdomain = Ustrrchr(subject, '@');
> At line 1151 it is used like this:
>     csb.subject = (cb->caseless)? string_copylc(sdomain+1) : \
>                                   string_copy(sdomain+1);
> D'oh. This gives Address 0x1 passed to string_copylc, if there's no "@"
> in the subject string.

>
> I'm not quite sure how to solve this issue, maybe a PANIC would do the
> trick, or maybe we should just [issue a warning and] return FALSE.


Noted.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book