Skip to content

Commit e8d1703

Browse files
committed
JS: Add test for flow through Buffer.concat
This flow was lost since the existing model of concat() boxes its return value in ArrayElement. There is no explicit model of Buffer.concat.
1 parent d79f429 commit e8d1703

File tree

1 file changed

+7
-0
lines changed
  • javascript/ql/test/library-tests/TripleDot

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import 'dummy';
2+
3+
function t1() {
4+
const b1 = Buffer.from(source("t1.1"));
5+
const b2 = Buffer.from(source("t1.2"));
6+
sink(Buffer.concat([b1, b2]).toString("utf8")); // $ MISSING: hasTaintFlow=t1.1 hasTaintFlow=t1.2
7+
}

0 commit comments

Comments
 (0)