File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
cpp/ql/src/experimental/Security/CWE/CWE-266 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ where
65
65
or
66
66
exists ( Expr exptmp , int i |
67
67
numberArgumentModFunctions ( fc .getTarget ( ) , i ) and
68
+ globalValueNumber ( exptmp ) = globalValueNumber ( fc .getArgument ( i ) ) and
69
+ exptmp .getAChild * ( ) instanceof BinaryArithmeticOperation and
68
70
not exptmp .getAChild * ( ) instanceof FunctionCall and
69
71
not exists ( SizeofOperator so | exptmp .getAChild * ( ) = so ) and
70
72
not exists ( ArrayExpr aetmp | aetmp .getArrayOffset ( ) = exptmp .getAChild * ( ) ) and
71
- exptmp .getAChild * ( ) instanceof BinaryArithmeticOperation and
72
73
not exptmp .getAChild * ( ) instanceof BinaryBitwiseOperation and
73
- globalValueNumber ( exptmp ) = globalValueNumber ( fc .getArgument ( i ) ) and
74
74
not exptmp .isConstant ( ) and
75
75
msg = "Using arithmetic to compute the mask may not be safe."
76
76
)
You can’t perform that action at this time.
0 commit comments