libregexp: fix match choice bug
This bug fix allows some pathological regular
expressions to cause the regexp library to
report a stack overflow (really a stack filling; safe)
but it also fixes the behavior of some common regexps.
It is too hard to satisfy both.
diff --git a/src/libregexp/rregexec.c b/src/libregexp/rregexec.c
index ec7907d..16d95e6 100644
--- a/src/libregexp/rregexec.c
+++ b/src/libregexp/rregexec.c
@@ -125,7 +125,7 @@
break;
case OR:
/* evaluate right choice later */
- if(_renewthread(tl, inst->u1.right, ms, &tlp->se) == tle)
+ if(_renewthread(tlp, inst->u1.right, ms, &tlp->se) == tle)
return -1;
/* efficiency: advance and re-evaluate */
continue;