This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: re_search_2 bug with NULL reference
- From: "Alexander V. Lukyanov" <lav at yars dot free dot net>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 4 Nov 2002 10:27:56 +0300
- Subject: Re: re_search_2 bug with NULL reference
- References: <200211010735.gA17Z5Z5015938@swing.yars.free.net> <200211030052.gA30qjv25076@magilla.sf.frob.com>
On Sat, Nov 02, 2002 at 04:52:45PM -0800, Roland McGrath wrote:
> Please isolate what the exact re_* calls are and the regex and match text
> involved, and produce a simple test program that just makes those calls and
> exhibits the crash.
Here is a short test program.
#include <string.h>
#include <regex.h>
int main()
{
char *rexp="/\\*([^*]|\\*[^/])*\\*/";
char *buf;
struct re_pattern_buffer rexp_c;
struct re_registers regs;
int bs;
memset(&rexp_c,0,sizeof(rexp_c));
memset(®s,0,sizeof(regs));
buf="/*a\nb\nc*/\n";
bs=strlen(buf);
re_syntax_options=RE_NO_BK_VBAR|RE_NO_BK_PARENS;
re_compile_pattern(rexp,strlen(rexp),&rexp_c);
re_search_2(&rexp_c,buf,bs,0,0,0,bs,®s,bs);
return 0;
}
--
Alexander.