Skip to content

Commit ff2b6b9

Browse files
authored
Python: Correctly locate stores to built-ins
1 parent 3d30efe commit ff2b6b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/src/semmle/python/ApiGraphs.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ module API {
422422
*/
423423
private predicate possible_builtin_defined_in_module(string name, Module m) {
424424
exists(NameNode n |
425-
n.isGlobal() and
425+
not exists(LocalVariable v | n.defines(v)) and
426426
n.isStore() and
427427
name = n.getId() and
428428
name = builtin_name() and

0 commit comments

Comments
 (0)