Removed taint from ArrayBuffer constructor as it accepts length

This commit is contained in:
Napalys
2025-04-09 13:27:13 +02:00
parent 4bc3e9e736
commit a3e4e62eac
3 changed files with 17 additions and 33 deletions

View File

@@ -74,20 +74,6 @@ private class ArrayBufferEntryPoint extends API::EntryPoint {
pragma[nomagic]
API::Node arrayBufferConstructorRef() { result = any(ArrayBufferEntryPoint a).getANode() }
class ArrayBufferConstructorSummary extends SummarizedCallable {
ArrayBufferConstructorSummary() { this = "ArrayBuffer constructor" }
override DataFlow::InvokeNode getACall() {
result = arrayBufferConstructorRef().getAnInstantiation()
}
override predicate propagatesFlow(string input, string output, boolean preservesValue) {
preservesValue = true and
input = "Argument[0].ArrayElement" and
output = "ReturnValue.ArrayElement"
}
}
class TransferLike extends SummarizedCallable {
TransferLike() { this = "ArrayBuffer#transfer" }