mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
move comments to match alert location for CWE-834
This commit is contained in:
@@ -35,9 +35,9 @@ function whileLoop(val) {
|
||||
function useLengthIndirectly(val) {
|
||||
var ret = [];
|
||||
|
||||
var len = val.length;
|
||||
var len = val.length; // NOT OK!
|
||||
|
||||
for (var i = 0; i < len; i++) { // NOT OK!
|
||||
for (var i = 0; i < len; i++) {
|
||||
ret.push(val[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ function returns(val) {
|
||||
}
|
||||
}
|
||||
|
||||
function lodashThrow(val) { // NOT OK!
|
||||
_.map(val, function (e) {
|
||||
function lodashThrow(val) {
|
||||
_.map(val, function (e) { // NOT OK!
|
||||
if (!e) {
|
||||
try {
|
||||
throw new Error(); // Does not prevent DoS.
|
||||
|
||||
Reference in New Issue
Block a user