mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
add test for new barrier
This commit is contained in:
@@ -79,6 +79,8 @@ typeInferenceMismatch
|
||||
| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:45:8:45:8 | x |
|
||||
| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:48:10:48:10 | x |
|
||||
| sanitizer-guards.js:68:11:68:18 | source() | sanitizer-guards.js:75:8:75:8 | x |
|
||||
| sanitizer-guards.js:79:11:79:18 | source() | sanitizer-guards.js:81:8:81:8 | x |
|
||||
| sanitizer-guards.js:79:11:79:18 | source() | sanitizer-guards.js:84:10:84:10 | x |
|
||||
| spread.js:2:15:2:22 | source() | spread.js:4:8:4:19 | { ...taint } |
|
||||
| spread.js:2:15:2:22 | source() | spread.js:5:8:5:43 | { f: 'h ... orld' } |
|
||||
| spread.js:2:15:2:22 | source() | spread.js:7:8:7:19 | [ ...taint ] |
|
||||
|
||||
@@ -74,3 +74,15 @@ function phi2() {
|
||||
}
|
||||
sink(x); // NOT OK
|
||||
}
|
||||
|
||||
function falsy() {
|
||||
let x = source();
|
||||
|
||||
sink(x); // NOT OK
|
||||
|
||||
if (x) {
|
||||
sink(x); // NOT OK
|
||||
} else {
|
||||
sink(x); // OK
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user