xpat bug (was: xpat changes between 2.3 and 2.4?

patricks at support.nl patricks at support.nl
Thu Nov 13 07:34:24 UTC 2003


Hi,

Can someone with cvs access have a look at this?

Thanks.

Patrick Schreurs
Support.Net / News-Service.com

---------- Forwarded message ----------
Date: Thu, 6 Nov 2003 14:20:47 +0100 (CET)
From: Tommy van Leeuwen <tommy at support.nl>
Cc: inn-workers at isc.org, inn-bugs at isc.org
Subject: Re: xpat changes between 2.3 and 2.4?

Hi Again,

After having a quick debug session we came to the conclusion that the
Glom() function from misc.c is broken. The allocated save variable is not
initialized. If it contains garbage, the pattern from xpat is also
garbage. Here's a small fix using calloc instead of alloc to initialize
the pointer and magically xpat is working.

Index: misc.c
===================================================================
RCS file: /cvs/inn/nnrpd/misc.c,v
retrieving revision 1.75.2.1
diff -u -r1.75.2.1 misc.c
--- misc.c      31 May 2003 19:48:27 -0000      1.75.2.1
+++ misc.c      6 Nov 2003 13:17:37 -0000
@@ -78,7 +78,7 @@
        i += strlen(*v) + 1;
     i++;

-    save = xmalloc(i);
+    save = xcalloc(1,i);
     for (v = av; *v; v++) {
        if (v > av)
             strlcat(save, " ", i);

Cheers,
Tommy van Leeuwen
News-Service.com

On Wed, 5 Nov 2003, Tommy van Leeuwen wrote:

> Hi,
>
> In the past few weeks we've been upgrading about 7 or 8 inn 2.3.x servers
> to 2.4 stable from cvs. Now it seems that XPAT doesn't work anymore, at
> all.  Well, at least it doesn't give any errors, but it doesn't give any
> results either.
>
> Has anything changed between 2.3 and 2.4 regarding XPAT?
>
> group alt.test
> 211 57159 2877337 2951242 alt.test
> xover 2951242
> 224 2951242 fields follow
> 2951242 testing Kent M Pitman <pitman at nhplace.com>      05 Nov 2003
> 14:19:09 -0500      <wkbrrqsjwy.fsf at nhplace.com>            998     1
> Xref: news-x2.support.nl alt.test:2951242
> .
> xpat Subject 1- *[tT][eE][sS][tT]*
> 221 Subject matches follow (NOV)
> .
>
> 221 Subject matches follow (NOV) is always the result, without any
> matches.
>
> Also, by using article searches instead of overview searches we get the
> same result:
>
> group nl.test
> 211 12946 383031 398746 nl.test
> head 398746
> 221 398746 <pan.2003.11.05.20.06.33.975758 at debian.localhost> head
> ...
> User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing
> moment of clarity.)
> ...
> xpat User-Agent 398700- *[pP][aA][nN]*
> 221 User-Agent matches follow (art)
> .
>
> Thanks for any input.
>
> Regards,
> Tommy van Leeuwen
> News-Service.com
>

--
Support Net bv - Partner in Managed Internet Solutions
Kruislaan 402-f   1098 SM  Amsterdam   +31(0)205979797
web: http://www.support.net/  email: tommy at support.net




More information about the inn-workers mailing list