We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 976e5ed commit ec205e9Copy full SHA for ec205e9
cpp/ql/src/semmle/code/cpp/commons/Buffer.qll
@@ -16,11 +16,12 @@ import semmle.code.cpp.dataflow.DataFlow
16
* ```
17
*/
18
private predicate isDynamicallyAllocatedWithDifferentSize(Class s) {
19
- exists(SizeofTypeOperator sof |
20
- sof.getTypeOperand().getUnspecifiedType() = s |
+ exists(SizeofOperator so |
+ so.(SizeofTypeOperator).getTypeOperand().getUnspecifiedType() = s or
21
+ so.(SizeofExprOperator).getExprOperand().getType().getUnspecifiedType() = s |
22
// Check all ancestor nodes except the immediate parent for
23
// allocations.
- isStdLibAllocationExpr(sof.getParent().(Expr).getParent+())
24
+ isStdLibAllocationExpr(so.getParent().(Expr).getParent+())
25
)
26
}
27
0 commit comments