1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

33566: regex module fix for unmatched parentheses

This commit is contained in:
Peter Stephenson 2015-06-22 17:35:38 +01:00
parent ea0f612c3a
commit 7d588bc158
2 changed files with 10 additions and 0 deletions

View file

@ -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;