Python: Make PathCheck a BarrierGuard

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-10-22 11:32:18 +02:00
parent f8dba85e0f
commit 6e361c7793

View File

@@ -94,10 +94,12 @@ module PathNormalization {
* A data-flow node that checks validates a path, for instance checking that it exists
* or that it is safe to access.
*/
class PathCheck extends DataFlow::Node {
class PathCheck extends DataFlow::BarrierGuard {
PathCheck::Range range;
PathCheck() { this = range }
override predicate checks(ControlFlowNode node, boolean branch) { range.checks(node, branch) }
}
/** Provides a class for modeling new path normalization APIs. */
@@ -106,7 +108,7 @@ module PathCheck {
* A data-flow node that checks validates a path, for instance checking that it exists
* or that it is safe to access.
*/
abstract class Range extends DataFlow::Node { }
abstract class Range extends DataFlow::BarrierGuard { }
}
/**