mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Refactored SortTaintStep to ArrayInPlaceManipulationTaintStep to support both sort and reverse functions. Fixed newly added test case. from 8026a99db7
This commit is contained in:
@@ -446,12 +446,12 @@ private module ArrayLibraries {
|
||||
}
|
||||
|
||||
/**
|
||||
* A taint propagating data flow edge arising from sorting.
|
||||
* A taint propagating data flow edge arising from in-place array manipulation operations.
|
||||
*/
|
||||
private class SortTaintStep extends TaintTracking::SharedTaintStep {
|
||||
private class ArrayInPlaceManipulationTaintStep extends TaintTracking::SharedTaintStep {
|
||||
override predicate heapStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(DataFlow::MethodCallNode call |
|
||||
call.getMethodName() = "sort" and
|
||||
call.getMethodName() in ["sort", "reverse"] and
|
||||
pred = call.getReceiver() and
|
||||
succ = call
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user