Files
codeql/javascript/ql/test/query-tests/Statements/InconsistentLoopOrientation/tst.js
Asger F 86932c51bc JS: Move some alerts to their correct location
One of the diffs look confusing but:
Previously parameter {2,3} where flagged, now parameter {1,2} are flagged.

Note that for command injection, the SystemCommandExecution is flagged
despite the test file claiming otherwise.
2025-02-28 13:27:40 +01:00

17 lines
247 B
JavaScript

for (j = i - 1; j >= 0; --j) {
}
for (j = i + 1; j < strLength; --j) {
} // $ Alert
for (var i = 0, l = c.length; i > l; i ++) {
} // $ Alert
for (i=lower-1; i>=0; --i)
a[i] = 0;
for (i=upper+1; i<a.length; --i)
a[i] = 0; // $ Alert