mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Update IncorrectPrivilegeAssignment.ql
This commit is contained in:
@@ -65,12 +65,12 @@ where
|
||||
or
|
||||
exists(Expr exptmp, int i |
|
||||
numberArgumentModFunctions(fc.getTarget(), i) and
|
||||
globalValueNumber(exptmp) = globalValueNumber(fc.getArgument(i)) and
|
||||
exptmp.getAChild*() instanceof BinaryArithmeticOperation and
|
||||
not exptmp.getAChild*() instanceof FunctionCall and
|
||||
not exists(SizeofOperator so | exptmp.getAChild*() = so) and
|
||||
not exists(ArrayExpr aetmp | aetmp.getArrayOffset() = exptmp.getAChild*()) and
|
||||
exptmp.getAChild*() instanceof BinaryArithmeticOperation and
|
||||
not exptmp.getAChild*() instanceof BinaryBitwiseOperation and
|
||||
globalValueNumber(exptmp) = globalValueNumber(fc.getArgument(i)) and
|
||||
not exptmp.isConstant() and
|
||||
msg = "Using arithmetic to compute the mask may not be safe."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user