[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pbmserv-dev] error in admin.c (fwd)



Well, the code inserting the extra "," appears to be in
admin.c/PrintAddress() .  But it's rather obscure code.  It's not
clear why it intends to overwrite ","s into strings, or why it's 
triggering in this case.

Good luck,
- Scott


void PrintAddress(FILE *fp, char **argv)
{
        if (!*argv)
                fprintf(fp,"%s\n",getenv("SENDER"));
        else {
                while (*argv) {
                        char *addr = *argv;
                        if (*addr == '[')
                                addr++;
                        if (addr[strlen(addr)-1] == ']')
                                addr[strlen(addr)-1] = '\0';
                        fprintf(fp,"%s",addr);
                        if (*(++argv))
                                fprintf(fp,",");
                }
                fprintf(fp,"\n");
        }
}


>----- Forwarded message from Martin Moller Pedersen -----
>
>From: Martin Moller Pedersen <tusk@daimi.au.dk>
>Message-Id: <200305121502.h4CF2TW5956134@amigo.daimi.au.dk>
>Subject: error in admin.c
>To: Martin Moller Pedersen <tusk@daimi.au.dk>
>Date: Mon, 12 May 2003 17:02:29 +0200 (MET DST)
>
>Hi,
>  I have looked in admin.c and I can't spot the error so it
>needs more eyes than mine.
>
>A user sent the subject:
>change address jorn-asko jorn-asko jorn.hansen@stibo.com jorn-asko@hansen.mail.d
k
>and got this reply:
>
>> -----Original Message-----
>> From: pbmserv [mailto:pbmserv@gamerz.net]
>> Sent: Monday, May 12, 2003 4:00 PM
>> Subject: Address changed for Userid jorn-asko
>> 
>> 
>> Address changed for Userid jorn-asko
>> You may now wish to update your pbmserv-users (or pbmserv-users-digest
>> subscription information.  Send a message to esquire@gamerz.net with
>> 
>> 	unsubscribe pbmserv-users your@old.addre.ss
>> 	subscribe pbmserv-users 
>> jorn.hansen@stibo.com,jorn-ask,o@hansen.mail.dk
>> 
>> as the message BODY
>> 
>
>
>----- End of forwarded message from Martin Moller Pedersen -----
>
>-- 
>Danske musikere tjener penge ved ulovlig softwarekopiering.
>
>
>To unsubscribe, send a message to esquire@gamerz.net with
>	unsubscribe pbmserv-dev@gamerz.net
>as the BODY of the message.  The SUBJECT is ignored.