Re: [pcre-dev] 8.33-RC1 is available for testing

Αρχική Σελίδα
Delete this message
Συντάκτης: Petr Pisar
Ημερομηνία:  
Προς: pcre-dev
Καινούρια Θέματα: [pcre-dev] [PATCH] Fix retrieving PCRE_INFO_MATCHLIMIT and PCRE_INFO_RECURSIONLIMIT
Αντικείμενο: Re: [pcre-dev] 8.33-RC1 is available for testing
On Thu, May 02, 2013 at 04:53:29PM +0200, Petr Pisar wrote:
> On Thu, May 02, 2013 at 04:21:49PM +0200, Petr Pisar wrote:
> > On Wed, May 01, 2013 at 05:51:40PM +0100, ph10@??? wrote:
> > > I have put a release candidate for the 8.33 release here:
> > >
> > This release is not good. Tests fail on 64-bit PowerPC (they pass on 32-bit
> > PowerPC):
> >
> > /(*LIMIT_MATCH=3000)(a+)*zz/I
> > Capturing subpattern count = 1
> > -Match limit = 3000
> > +Match limit = 0
> > No options
> > No first char
> > Need char = 'z'
> >
> I think that's because pcre_fullinfo() dereferences the destination pointer
> without respect to the size of the referenced type:
>
> case PCRE_INFO_MATCHLIMIT:

[...]
> The same problem can be seen at PCRE_INFO_RECURSIONLIMIT.
>

None of the two info constants are documented in pcre_fullinfo(3). Though
pcreapi(3) describes them as unsigned 32-bit integer.

So I propose to replace the (unsigned long int *) typecasts to (pcre_uint32*)
in the pcre_fullinfo() function.

-- Petr