Re: [pcre-dev] AV in pcre_dfa_exe.c followed by application …

Top Pagina
Delete this message
Auteur: ph10
Datum:  
Aan: Christian Persch
CC: pcre-dev
Onderwerp: Re: [pcre-dev] AV in pcre_dfa_exe.c followed by application crash
On Wed, 15 May 2013, Christian Persch wrote:

> > The following C code triggers an AV in pcre_dfa_exec(), followed by an
> > application crash. I was unable to reproduce this with pcretest, but
> > this C code triggers the problem reliably.
>
> Attached patch fixes this.


I do love it when I go away for a bit and, when I get back, find that
somebody else has done all the work and found the bug that I was about
to work on. Thank you for diagnosing this. The patch is correct, though
I also had to add some casts to stop compiler warnings. I *did* manage
to reproduce the problem with pcretest: it was caused by calling
pcre_dfa_exec() with a vector length of zero, so this test file does it:

/abcd/
abcd\O0\D

I have committed the patched file, and updated the tests to include this
case (I also reworded the informative message to be a bit more clear).

Philip

--
Philip Hazel