On Thu, May 03, 2001 at 04:45:17PM -0600, Mark Belnap wrote:
>   I just found this problem the other day on my system.  You wouldn't
> happen to have mailReplyText empty for that entry would you?  In any
> case this is an error that shouldn't cause a core dump, but should be
> handled like it appears the code tries to do.
>  
>   I'm using an old ldap-patch (20001003 I think?) with local mods so the
> line numbers won't match up, but here is a fix that I used to modify
> qmail-local.c
> 
> 660a661,663
> >   /* rplytxt is needed so that 's' won't get clobbered and cause big problems
> >      when mailReplyText does not exist  BUG00525 */
> >  char *rplytxt;
> 875d877
> < 
> 891c893
> <            if ( s = env_get(ENV_REPLYTEXT) ) {
> ---
> >            if ( rplytxt = env_get(ENV_REPLYTEXT) ) {
> 896c898
> <                sayit("replytext ",s,str_len(s));
> ---
> >                sayit("replytext ",rplytxt,str_len(rplytxt));
> 

Thanks, added the patch (hopefully it will get in the soon comming
release).

The bug is a copy-paste error, the variable s is used for the deliverymode
entries and will be overwritten by the reply text (when deliverymode is
set to reply). This will cause strange effects if mutliple deliverymodes
are used. Everything after "reply" will be ignored.
qmail-local does only crash when you set deliverymode to local but you do not
define a replytext (env QMAILREPLYTEXT is undefined). In that case s will be
set to NULL and bang.

NOTE: qmail-ldaplookup is not effected by that bug.

-- 
later
Claudio

mailto:[EMAIL PROTECTED]

Reply via email to