(re *regexp.Regexp, s string)
| 333 | const maxRegexInputLen = 10_000 |
| 334 | |
| 335 | func safeRegexMatch(re *regexp.Regexp, s string) bool { |
| 336 | if len(s) > maxRegexInputLen { |
| 337 | s = s[:maxRegexInputLen] |
| 338 | } |
| 339 | return re.MatchString(s) |
| 340 | } |
| 341 | |
| 342 | // initTautologyCapturePatterns initializes patterns used to detect raw-SQL tautologies. |
| 343 | // Because Go's RE2 engine does not support backreferences, each pattern captures both |
no outgoing calls
no test coverage detected