Merge branch 'codeql-cli-2.20.4' into release-prep/2.20.4

This commit is contained in:
Arthur Baars
2025-02-03 18:37:16 +01:00
committed by GitHub
3 changed files with 19 additions and 6 deletions

View File

@@ -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()
)
}