mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge branch 'codeql-cli-2.20.4' into release-prep/2.20.4
This commit is contained in:
@@ -49,7 +49,11 @@ private Class getRootType(FieldAccess fa) {
|
||||
exists(VariableAccess root |
|
||||
root = fa.getQualifier+() and
|
||||
not exists(root.getQualifier()) and
|
||||
result = root.getUnspecifiedType()
|
||||
// We strip the type because the root may be a pointer. For example `p` in:
|
||||
// struct S { char buffer[10]; };
|
||||
// S* p = ...;
|
||||
// strcpy(p->buffer, "abc");
|
||||
result = root.getUnspecifiedType().stripType()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user