Skip to content

Commit 9b9b4a1

Browse files
committed
Swift: Fix QL-for-QL warnings.
1 parent 9e9ef42 commit 9b9b4a1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

swift/ql/lib/codeql/swift/regex/internal/ParseRegex.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ abstract class RegExp extends Expr {
193193
}
194194

195195
/**
196-
* Holds if the character set starting at `charset_start` contains a character range
197-
* with lower bound found between `start` and `lower_end`
198-
* and upper bound found between `upper_start` and `end`.
196+
* Holds if the character set starting at `charsetStart` contains a character range
197+
* with lower bound found between `start` and `lowerEnd`
198+
* and upper bound found between `upperStart` and `end`.
199199
*/
200200
predicate charRange(int charsetStart, int start, int lowerEnd, int upperStart, int end) {
201201
exists(int index |
@@ -841,11 +841,11 @@ abstract class RegExp extends Expr {
841841
}
842842

843843
/**
844-
* Holds if a qualified part is found between `start` and `part_end` and the qualifier is
844+
* Holds if a qualified part is found between `start` and `partEnd` and the qualifier is
845845
* found between `part_end` and `end`.
846846
*
847-
* `maybe_empty` is true if the part is optional.
848-
* `may_repeat_forever` is true if the part may be repeated unboundedly.
847+
* `maybeEmpty` is true if the part is optional.
848+
* `mayRepeatForever` is true if the part may be repeated unboundedly.
849849
*/
850850
predicate qualifiedPart(
851851
int start, int partEnd, int end, boolean maybeEmpty, boolean mayRepeatForever

swift/ql/test/library-tests/regex/regex.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ module RegexTest implements TestSig {
1212
string getARelevantTag() { result = ["regex", "input", "redos-vulnerable", "hasParseFailure"] }
1313

1414
predicate hasActualResult(Location location, string element, string tag, string value) {
15-
exists(TreeView::RegExpTerm t, string pump, State s, string prefixMsg |
16-
hasReDoSResult(t, pump, s, prefixMsg) and
15+
exists(TreeView::RegExpTerm t |
16+
hasReDoSResult(t, _, _, _) and
1717
location = t.getLocation() and
1818
element = t.toString() and
1919
tag = "redos-vulnerable" and

0 commit comments

Comments
 (0)