mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
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.
This commit is contained in:
parent
79ff7e4b5e
commit
27589754e4
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ regexec1(Reprog *progp, /* program to run */
|
|||
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;
|
||||
|
|
|
@ -125,7 +125,7 @@ rregexec1(Reprog *progp, /* program to run */
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue