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

Skip to content

Commit d9be660

Browse files
committed
JS: Extend
1 parent d079cb5 commit d9be660

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

javascript/ql/src/semmle/javascript/Extend.qll

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,12 @@ private class FunctionalExtendCallShallow extends ExtendCall {
165165
* A taint propagating data flow edge from the objects flowing into an extend call to its return value
166166
* and to the source of the destination object.
167167
*/
168-
private class ExtendCallTaintStep extends TaintTracking::AdditionalTaintStep {
169-
ExtendCall extend;
170-
171-
ExtendCallTaintStep() { this = extend }
172-
168+
private class ExtendCallTaintStep extends TaintTracking::SharedTaintStep {
173169
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
174-
pred = extend.getASourceOperand() and succ = extend.getDestinationOperand().getALocalSource()
175-
or
176-
pred = extend.getAnOperand() and succ = extend
170+
exists(ExtendCall extend |
171+
pred = extend.getASourceOperand() and succ = extend.getDestinationOperand().getALocalSource()
172+
or
173+
pred = extend.getAnOperand() and succ = extend
174+
)
177175
}
178176
}

0 commit comments

Comments
 (0)