Skip to content

Commit e9e6bce

Browse files
committed
shared: handle empty groups in delta
1 parent 88fc96e commit e9e6bce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shared/regex/codeql/regex/nfa/NfaUtils.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,12 @@ module Make<RegexTreeViewSig TreeImpl> {
760760
or
761761
exists(RegExpGroup grp | lbl = Epsilon() | q1 = before(grp) and q2 = before(grp.getChild(0)))
762762
or
763+
exists(RegExpGroup grp | lbl = Epsilon() |
764+
not exists(grp.getAChild()) and
765+
q1 = before(grp) and
766+
q2 = before(grp.getSuccessor())
767+
)
768+
or
763769
exists(EffectivelyStar star | lbl = Epsilon() |
764770
q1 = before(star) and q2 = before(star.getChild(0))
765771
or

0 commit comments

Comments
 (0)