C++: Add models.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-11-26 17:56:32 +00:00
parent 749602c982
commit 763b991408
3 changed files with 29 additions and 0 deletions

View File

@@ -50,3 +50,4 @@ private import implementations.System
private import implementations.StructuredExceptionHandling
private import implementations.ZMQ
private import implementations.Win32CommandExecution
private import implementations.CA2AEX

View File

@@ -0,0 +1,17 @@
private import cpp
private import semmle.code.cpp.ir.dataflow.FlowSteps
private import semmle.code.cpp.dataflow.new.DataFlow
/**
* The `CA2AEX` (and related) classes from the Windows Active Template library.
*/
class Ca2Aex extends Class {
Ca2Aex() { this.hasGlobalName(["CA2AEX", "CA2CAEX", "CA2WEX"]) }
}
private class Ca2AexTaintInheritingContent extends TaintInheritingContent, DataFlow::FieldContent {
Ca2AexTaintInheritingContent() {
// The two members m_psz and m_szBuffer
this.getField().getDeclaringType() instanceof Ca2Aex
}
}