Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c20336

Browse files
committed
Python points-to. Fix attribute lookup for type.
1 parent a03e101 commit 1c20336

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python/ql/src/semmle/python/objects/Classes.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ class TypeInternal extends ClassObjectInternal, TType {
284284
}
285285

286286
override predicate lookup(string name, ObjectInternal value, CfgOrigin origin) {
287-
none()
287+
value = ObjectInternal::fromBuiltin(Builtin::special("type").getMember(name)) and
288+
origin = CfgOrigin::unknown()
288289
}
289290

290291
pragma [noinline] override predicate attributesUnknown() { any() }

0 commit comments

Comments
 (0)