mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
fix that js/file-system-race could have FPs related to loops
This commit is contained in:
@@ -41,3 +41,8 @@ const filePath3 = createFile();
|
||||
if (fs.existsSync(filePath3)) {
|
||||
fs.readFileSync(filePath3); // OK - a read after an existence check is OK
|
||||
}
|
||||
|
||||
const filePath4 = createFile();
|
||||
while(Math.random() > 0.5) {
|
||||
fs.open(filePath4); // OK - it is only ever opened here.
|
||||
}
|
||||
Reference in New Issue
Block a user