Skip to content

Commit a60fe9f

Browse files
committed
C++: exclude 0 earlier in InsufficientKeySize
1 parent a37f746 commit a60fe9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Security/CWE/CWE-326/InsufficientKeySize.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class KeyStrengthFlow extends DataFlow::Configuration {
3131
KeyStrengthFlow() { this = "KeyStrengthFlow" }
3232

3333
override predicate isSource(DataFlow::Node node) {
34-
node.asInstruction() instanceof IntegerConstantInstruction
34+
node.asInstruction().(IntegerConstantInstruction).getValue() != "0"
3535
}
3636

3737
override predicate isSink(DataFlow::Node node) {

0 commit comments

Comments
 (0)