Skip to content

Commit 1ad204d

Browse files
committed
make after and TState private in ReDoSUtil
1 parent df04c50 commit 1ad204d

File tree

2 files changed

+4
-4
lines changed
  • javascript/ql/lib/semmle/javascript/security/performance
  • python/ql/lib/semmle/python/security/performance

2 files changed

+4
-4
lines changed

javascript/ql/lib/semmle/javascript/security/performance/ReDoSUtil.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private State before(RegExpTerm t) { result = Match(t, 0) }
544544
/**
545545
* Gets a state the NFA may be in after matching `t`.
546546
*/
547-
State after(RegExpTerm t) {
547+
private State after(RegExpTerm t) {
548548
exists(RegExpAlt alt | t = alt.getAChild() | result = after(alt))
549549
or
550550
exists(RegExpSequence seq, int i | t = seq.getChild(i) |
@@ -673,7 +673,7 @@ RegExpRoot getRoot(RegExpTerm term) {
673673
/**
674674
* A state in the NFA.
675675
*/
676-
newtype TState =
676+
private newtype TState =
677677
/**
678678
* A state representing that the NFA is about to match a term.
679679
* `i` is used to index into multi-char literals.

python/ql/lib/semmle/python/security/performance/ReDoSUtil.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private State before(RegExpTerm t) { result = Match(t, 0) }
544544
/**
545545
* Gets a state the NFA may be in after matching `t`.
546546
*/
547-
State after(RegExpTerm t) {
547+
private State after(RegExpTerm t) {
548548
exists(RegExpAlt alt | t = alt.getAChild() | result = after(alt))
549549
or
550550
exists(RegExpSequence seq, int i | t = seq.getChild(i) |
@@ -673,7 +673,7 @@ RegExpRoot getRoot(RegExpTerm term) {
673673
/**
674674
* A state in the NFA.
675675
*/
676-
newtype TState =
676+
private newtype TState =
677677
/**
678678
* A state representing that the NFA is about to match a term.
679679
* `i` is used to index into multi-char literals.

0 commit comments

Comments
 (0)