mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: performance tweaks for InsufficientKeySize
This commit is contained in:
@@ -31,7 +31,10 @@ class KeyStrengthFlow extends DataFlow::Configuration {
|
||||
KeyStrengthFlow() { this = "KeyStrengthFlow" }
|
||||
|
||||
override predicate isSource(DataFlow::Node node) {
|
||||
node.asInstruction().(IntegerConstantInstruction).getValue() != "0"
|
||||
exists(int bits |
|
||||
node.asInstruction().(IntegerConstantInstruction).getValue().toInt() = bits and
|
||||
bits < getMinimumKeyStrength(_, _) and
|
||||
bits > 0 // exclude sentinel values
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node node) {
|
||||
|
||||
Reference in New Issue
Block a user