Re: [evolution-patches] Re: [Evolution-hackers] Logic flaw in header_decode_lwsp()



Indeed a good find Jules.

Thanks for the patch fejj.

Cheers,
partha

On Fri, 2005-12-02 at 14:15 -0500, Jeffrey Stedfast wrote:
> On Fri, 2005-12-02 at 15:19 +0100, Jules Colding wrote:
> > Hi,
> > 
> > The following while statement does not make sense:
> > 
> > ############# snip ###########
> > static void
> > header_decode_lwsp(const char **in)
> > {
> > 	const char *inptr = *in;
> > 	char c;
> > 
> > 	d2(printf("is ws: '%s'\n", *in));
> > 
> > 	while (camel_mime_is_lwsp(*inptr) || (*inptr =='(' && *inptr != '\0')) {
> >         .
> >         .
> >         .
> > 
> > ############# snip ###########
> > 
> > If *inptr is equal to '(' then it is per definition not equal to '\0'. 
> > 
> > OK, "does not makes sense" might to harsh, but it definitely does not
> > seem to done this way on purpose. 
> 
> indeed, and while I was fixing that logic problem I also removed the
> '\0' check since it isn't needed in any way (if it is lwsp or '(' then
> it can't be \0)
> 
> 
> 
> > 
> > 
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-patches




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