mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
C++: Add an taint step from object to field for 'CComBSTR's.
This commit is contained in:
@@ -51,3 +51,4 @@ private import implementations.StructuredExceptionHandling
|
||||
private import implementations.ZMQ
|
||||
private import implementations.Win32CommandExecution
|
||||
private import implementations.CA2AEX
|
||||
private import implementations.CComBSTR
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
private import cpp
|
||||
private import semmle.code.cpp.ir.dataflow.FlowSteps
|
||||
private import semmle.code.cpp.dataflow.new.DataFlow
|
||||
|
||||
/** The `CComBSTR` class from the Microsoft "Active Template Library". */
|
||||
class CcomBstr extends Class {
|
||||
CcomBstr() { this.hasGlobalName("CComBSTR") }
|
||||
}
|
||||
|
||||
private class Mstr extends Field {
|
||||
Mstr() { this.getDeclaringType() instanceof CcomBstr and this.hasName("m_str") }
|
||||
}
|
||||
|
||||
private class MstrTaintInheritingContent extends TaintInheritingContent, DataFlow::FieldContent {
|
||||
MstrTaintInheritingContent() { this.getField() instanceof Mstr }
|
||||
}
|
||||
Reference in New Issue
Block a user