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
6565 or
6666 exists ( Expr exptmp , int i |
6767 numberArgumentModFunctions ( fc .getTarget ( ) , i ) and
68+ globalValueNumber ( exptmp ) = globalValueNumber ( fc .getArgument ( i ) ) and
69+ exptmp .getAChild * ( ) instanceof BinaryArithmeticOperation and
6870 not exptmp .getAChild * ( ) instanceof FunctionCall and
6971 not exists ( SizeofOperator so | exptmp .getAChild * ( ) = so ) and
7072 not exists ( ArrayExpr aetmp | aetmp .getArrayOffset ( ) = exptmp .getAChild * ( ) ) and
71- exptmp .getAChild * ( ) instanceof BinaryArithmeticOperation and
7273 not exptmp .getAChild * ( ) instanceof BinaryBitwiseOperation and
73- globalValueNumber ( exptmp ) = globalValueNumber ( fc .getArgument ( i ) ) and
7474 not exptmp .isConstant ( ) and
7575 msg = "Using arithmetic to compute the mask may not be safe."
7676 )
You can’t perform that action at this time.
0 commit comments