Re: [pcre-dev] [Bug 843] PCRE library segfaults on random in…

Página Principal
Apagar esta mensagem
Autor: Philip Hazel
Data:  
Para: Sheri
CC: pcre-dev
Assunto: Re: [pcre-dev] [Bug 843] PCRE library segfaults on random input
On Fri, 24 Apr 2009, Sheri wrote:

> Works, now regcomp returns non-zero, which can be used to prevent use of
> regexec.


Good. Thanks for doing that testing. The patch is committed, so will be
in the next release (whenever that is).

> If the erroneous regexp is fed to regexec, there is a still a
> crash (and my library doesn't use stack for recursion).


The "erroneous regexp" is in fact NULL, so it's no wonder that it
crashes. Maybe I should state that explicitly in the documentation:
"Don't try to obey if your compile failed."

Philip

--
Philip Hazel