зеркало из https://github.com/github/codeql.git
mark the range [0-?] as good in the overly-large-range query
This commit is contained in:
Родитель
1fba345fb3
Коммит
1a8a70dc1b
|
@ -27,4 +27,6 @@ var overlapsWithClass1 = /[0-9\d]/; // NOT OK
|
|||
var overlapsWithClass2 = /[\w,.-?:*+]/; // NOT OK
|
||||
|
||||
var tst2 = /^([ァ-ヾ]|[ァ-ン゙゚])+$/; // OK
|
||||
var tst3 = /[0-90-9]/; // OK
|
||||
var tst3 = /[0-90-9]/; // OK
|
||||
|
||||
var question = /[0-?]/; // OK. matches one of: 0123456789:;<=>?
|
|
@ -129,6 +129,9 @@ module Make<RegexTreeViewSig TreeImpl> {
|
|||
or
|
||||
// starting from the zero byte is a good indication that it's purposely matching a large range.
|
||||
result.isRange(0.toUnicode(), _)
|
||||
or
|
||||
// the range 0123456789:;<=>? is intentional
|
||||
result.isRange("0", "?")
|
||||
}
|
||||
|
||||
/** Gets a char between (and including) `low` and `high`. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче