mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
C++: Only allow taint to a FieldAddressInstruction if it's a union type.
This commit is contained in:
@@ -64,7 +64,7 @@ private predicate operandToInstructionTaintStep(Operand opFrom, Instruction inst
|
||||
or
|
||||
instrTo instanceof PointerArithmeticInstruction
|
||||
or
|
||||
instrTo instanceof FieldAddressInstruction
|
||||
instrTo.(FieldAddressInstruction).getField().getDeclaringType() instanceof Union
|
||||
or
|
||||
// The `CopyInstruction` case is also present in non-taint data flow, but
|
||||
// that uses `getDef` rather than `getAnyDef`. For taint, we want flow
|
||||
|
||||
Reference in New Issue
Block a user