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

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Sheri
CC: pcre-dev
Subject: 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