Re: [evolution-patches] patch review for crash bug
- From: Calvin Liu <calvin liu sun com>
- To: Not Zed <notzed ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, evolution-patches lists ximian com
- Subject: Re: [evolution-patches] patch review for crash bug
- Date: Tue, 02 Dec 2003 09:10:50 +0800
Aha, I just "grep" in source code and found the isxdigit. It's already
there, great! :)
And I prefer to this one. So NotZed, please checkin the patch. It's
important to Solaris build.
Thank you very much!
Calvin
On Tue, 2003-12-02 at 05:22, Not Zed wrote:
> An even better (there is never a proper :) fix would be:
>
> if (*s == '%' && isxdigit(s[1]) && isxdigit(s[2])) {
> *d++ = (XDIGIT (s[1]) << 4) + XDIGIT (s[2]);
> s += 2;
> } else
> *d++ = *s;
>
> The extra logic below is redundant.
>
> As for the actual bug this is supposed to fix, the logic must be wrong
> elsewhere, it isn't encoding hte url correctly, which it should be, so
> this 'fix' isn't really required for that bug, all it is doing is
> hiding that bug. (the fix is still required since we can get url's
> from external sources).
>
> On Tue, 2003-12-02 at 04:05, Jeffrey Stedfast wrote:
> > the proper fix would be to change:
> >
> > if (*s == '%' && s[1] && s[2]) {
> >
> > to
> >
> > if (*s == '%') {
> > if (isxdigit (s[1]) && isxdigit (s[2])) {
> > *d++ = (XDIGIT (s[1]) << 4) + XDIGIT (s[2]);
> > s += 2;
> > } else {
> > *d++ = *s;
> > if (s[1] == '%')
> > *d++ = *s++;
> > }
> > } else
> > *d++ = *s;
> >
> > Jeff
> >
> > On Mon, 2003-12-01 at 06:31, Calvin Liu wrote:
> > > Hi, there,
> > >
> > > Here's a small patch to fix a crash bug.
> > > If you create vfolder like "xxx%%$$" it'll crash on solaris or
> > > mis-displayed.
> > > Suppose we shouldn't decode for all "%xx" case, the "x" here should be
> > > {digital|a~z|A~z}.
> > >
> > > Thanks.
> > > Calvin
> >
> > _______________________________________________
> > Evolution-patches mailing list
> > Evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]