Skip to content

Commit 41bdd8f

Browse files
committed
minor fixes
1 parent b13e7c0 commit 41bdd8f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/ResourceExhaustionCustomizations.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ module ResourceExhaustion {
2828
abstract class Sanitizer extends DataFlow::Node { }
2929

3030
/** A source of remote user input, considered as a data flow source for resource exhaustion vulnerabilities. */
31-
class RemoteFlowSourceAsSource extends Source {
32-
RemoteFlowSourceAsSource() { this instanceof RemoteFlowSource }
33-
}
31+
class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { }
3432

3533
/**
3634
* A node that determines the repetitions of a string, considered as a data flow sink for resource exhaustion vulnerabilities.

javascript/ql/src/Security/CWE-770/examples/ResourceExhaustion_array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var http = require("http"),
44
var server = http.createServer(function(req, res) {
55
var size = parseInt(url.parse(req.url, true).query.size);
66

7-
let dogs = new Array(size).fill(x => "dog"); // BAD
7+
let dogs = new Array(size).fill("dog"); // BAD
88

99
// ... use the dog
1010
});

javascript/ql/src/Security/CWE-770/examples/ResourceExhaustion_array_fixed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var server = http.createServer(function(req, res) {
1010
return;
1111
}
1212

13-
let dogs = new Array(size).fill(x => "dog"); // GOOD
13+
let dogs = new Array(size).fill("dog"); // GOOD
1414

1515
// ... use the dogs
1616
});

0 commit comments

Comments
 (0)