C++: Add implicit read of the 'm_strPath' member.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-11-27 14:18:16 +00:00
parent 354361952a
commit c61395b973
3 changed files with 26 additions and 9 deletions

View File

@@ -52,3 +52,4 @@ private import implementations.ZMQ
private import implementations.Win32CommandExecution
private import implementations.CA2AEX
private import implementations.CComBSTR
private import implementations.CPathT

View File

@@ -0,0 +1,16 @@
private import cpp
private import semmle.code.cpp.ir.dataflow.FlowSteps
private import semmle.code.cpp.dataflow.new.DataFlow
/** The `CPathT` class from the Microsoft "Active Template Library". */
class CPathT extends Class {
CPathT() { this.hasGlobalName("CPathT") }
}
private class MStrPath extends Field {
MStrPath() { this.getDeclaringType() instanceof CPathT and this.hasName("m_strPath") }
}
private class MStrPathTaintInheritingContent extends TaintInheritingContent, DataFlow::FieldContent {
MStrPathTaintInheritingContent() { this.getField() instanceof MStrPath }
}