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

Skip to content

Commit 2b72a50

Browse files
committed
Python points-to: Fix up re extension.
1 parent bf78c62 commit 2b72a50

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

python/ql/src/semmle/python/types/Extensions.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ class ReModulePointToExtension extends PointsToExtension {
109109
}
110110

111111
override predicate pointsTo(Context context, ObjectInternal value, ControlFlowNode origin) {
112-
value = Module::named("sre_constants").attr("SRE_FLAG_" + name) and
113-
exists(ModuleObjectInternal sre_constants |
112+
exists(ModuleObjectInternal sre_constants, CfgOrigin orig |
114113
sre_constants.getName() = "sre_constants" and
115-
sre_constants.attribute(name, value, CfgOrigin::fromCfgNode(origin))
114+
sre_constants.attribute("SRE_FLAG_" + name, value, orig) and
115+
origin = orig.asCfgNodeOrHere(this)
116116
)
117117
and context.appliesTo(this)
118118
}

0 commit comments

Comments
 (0)