From 7d588bc158c24d4e60b579d60b76cde55225b01c Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 22 Jun 2015 17:35:38 +0100 Subject: 33566: regex module fix for unmatched parentheses --- Src/Modules/regex.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Src/Modules') diff --git a/Src/Modules/regex.c b/Src/Modules/regex.c index 94f523f32..16cc77f30 100644 --- a/Src/Modules/regex.c +++ b/Src/Modules/regex.c @@ -155,6 +155,11 @@ zcond_regex_match(char **a, int id) ++n, ++m, ++bptr, ++eptr) { char buf[DIGBUFSIZE]; + if (m->rm_so < 0 || m->rm_eo < 0) { + *bptr = ztrdup("-1"); + *eptr = ztrdup("-1"); + continue; + } ptr = lhstr; leftlen = m->rm_so; offs = 0; -- cgit 1.4.1