Skip to content

Commit 45b6906

Browse files
committed
move comments to match alert location for CWE-834
1 parent 71a3d49 commit 45b6906

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

javascript/ql/test/query-tests/Security/CWE-834/LoopBoundInjectionBad.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ function whileLoop(val) {
3535
function useLengthIndirectly(val) {
3636
var ret = [];
3737

38-
var len = val.length;
38+
var len = val.length; // NOT OK!
3939

40-
for (var i = 0; i < len; i++) { // NOT OK!
40+
for (var i = 0; i < len; i++) {
4141
ret.push(val[i]);
4242
}
4343
}

javascript/ql/test/query-tests/Security/CWE-834/LoopBoundInjectionExitBad.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ function returns(val) {
5656
}
5757
}
5858

59-
function lodashThrow(val) { // NOT OK!
60-
_.map(val, function (e) {
59+
function lodashThrow(val) {
60+
_.map(val, function (e) { // NOT OK!
6161
if (!e) {
6262
try {
6363
throw new Error(); // Does not prevent DoS.

0 commit comments

Comments
 (0)