We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c6cc3a commit c9ed039Copy full SHA for c9ed039
cpp/ql/src/semmle/code/cpp/commons/Buffer.qll
@@ -40,6 +40,9 @@ predicate memberMayBeVarSize(Class c, MemberVariable v) {
40
) or exists(AddressOfExpr aoe |
41
// `&(c.v)` is taken
42
aoe.getAddressable() = v
43
+ ) or exists(BuiltInOperationOffsetOf oo |
44
+ // `offsetof(c, v)` using a builtin
45
+ oo.getAChild().(VariableAccess).getTarget() = v
46
)
47
48
}
0 commit comments