mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
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.
This commit is contained in:
7
javascript/ql/test/library-tests/TripleDot/buffer.js
Normal file
7
javascript/ql/test/library-tests/TripleDot/buffer.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import 'dummy';
|
||||
|
||||
function t1() {
|
||||
const b1 = Buffer.from(source("t1.1"));
|
||||
const b2 = Buffer.from(source("t1.2"));
|
||||
sink(Buffer.concat([b1, b2]).toString("utf8")); // $ MISSING: hasTaintFlow=t1.1 hasTaintFlow=t1.2
|
||||
}
|
||||
Reference in New Issue
Block a user