Added tests for arrays toSpliced with pop

This commit is contained in:
Napalys
2024-11-13 12:58:24 +01:00
parent b4c84d3d3c
commit 2d9bc43506

View File

@@ -94,4 +94,17 @@
sink(["source"].filter((x) => x)); // NOT OK
sink(["source"].filter((x) => !!x)); // NOT OK
var arr8 = [];
arr8 = arr8.toSpliced(0, 0, "source");
sink(arr8.pop()); // NOT OK -- Should be considered tainted, but it is not
var arr8_variant = [];
arr8_variant = arr8_variant.toSpliced(0, 0, "safe", "source");
arr8_variant.pop();
sink(arr8_variant.pop()); // NOT OK -- Should be considered tainted, but it is not
var arr8_spread = [];
arr8_spread = arr8_spread.toSpliced(0, 0, ...arr);
sink(arr8_spread.pop()); // NOT OK -- Should be considered tainted, but it is not
});