mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Ruby: fix 'inefficient string comparison' alert
This commit is contained in:
@@ -79,7 +79,7 @@ module HardcodedDataInterpretedAsCode {
|
||||
forex(StringComponentCfgNode c |
|
||||
c = this.asExpr().(ExprNodes::StringlikeLiteralCfgNode).getAComponent()
|
||||
|
|
||||
c.getNode().(AST::StringEscapeSequenceComponent).getRawText().prefix(2) = "\\x"
|
||||
c.getNode().(AST::StringEscapeSequenceComponent).getRawText().matches("\\x%")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user