Hi,
Please find the diff of rfc822.c attached.
Regards
Rohit
----- Original Message -----
From: "Eric S. Raymond" <esr(_at_)thyrsus(_dot_)com>
To: "rohit , kumar mailto:hello(_at_)hurkle(_dot_)thyrsus(_dot_)com"
<rohitk(_at_)whitepj(_dot_)com>
Cc: <fetchmail-friends(_at_)ccil(_dot_)org>
Sent: Sunday, July 01, 2001 9:43 AM
Subject: Re: [fetchmail]Small Bug in address parsing
rohit , kumar hello(_at_)hurkle(_dot_)thyrsus(_dot_)com,
<rohitk(_at_)whitepj(_dot_)com>:
Hi,
I think there is small bug in the way address is being parsed.
Suppose the name is of the format
abc , def" hello,\
Then the name sent is in the following format
"abc , def\" hello,\\"<email_address>
The fetchmail rewrites the From as
"abc , def\" hello(_at_)server,\\"<email_address>
To correct it I think the following code should be modified :
File : rfc822.c
Function : reply_hack()
case2:
if (*from == '"')
/**************** Added By Rohit
************************************************/
if(*(from -1) != '\\' )
{
state = 1;
}
else
{
int i_count = 0;
int i = 1;
while(*(from -i) == '\\')
{
i++;
i_count++;
}
if(i_count % 2 == 0)
{
state = 1;
}
}
break;
Thanks And Regards
Rohit
Sorry, can you send this change as a diff?
--
<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>
The day will come when the mystical generation of Jesus by the Supreme
Being as his father, in the womb of a virgin, will be classed with the
fable of the generation of Minerva in the brain of Jupiter.
-- Thomas Jefferson, 1823
_______________________________________________
Fetchmail-friends mailing list
Fetchmail-friends(_at_)lists(_dot_)ccil(_dot_)org
http://lists.ccil.org/mailman/listinfo/fetchmail-friends
begin 666 diff.dat
M,S9A,S<-"CX(_at_)#0HQ-#AC,30Y+#$V. T*/" )"2 @("!S=&%T92 ](#$[#0HM
M+2T-"CX@"0D)+RHJ*BHJ*BHJ*BHJ*BHJ*BH(_at_)061D960@0GD(_at_)4F]H:70(_at_)*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M+PT*/B )"0EI9B(_at_)J*&9R;VT(_at_)+3$I("$]("=<7"<I#0H^( D)"7L-"CX@"0D@
M(" @"7-T871E(#T@,3L-"CX@"0D)?0T*/B )"0EE;'-E#0H^( D)"7L-"CX@
M"0D)"6EN="!I7V-O=6YT(" ](# [#0H^( D)"0EI;G0@:2 ](#$[#0H^( D)
M"0EW:&EL92(_at_)J*&9R;VT(_at_)+6DI(#T]("=<7"<I#0H^( D)"0E[#0H^( D)"0D)
M:2LK.PT*/B )"0D)"6E?8V]U;G0K*SL-"CX@"0D)"7T-"CX@"0D)"6EF*&E?
M8V]U;G0@)2 R(#T](# I#0H^( D)"0E[#0H^( D)"0D)<W1A=&4@/2 Q.PT*
M/B )"0D)?0T*/B )"0E]#0H^( D)"0T*,S$Y9#,S. T*/" )"7-T871E(#T@
+;VQD<W1A=&4[#0H`
`
end