Examples of errors detected by the V6016 diagnostic


V6016. Suspicious access to element by a constant index inside a loop.


Bouncy Castle

V6016 Suspicious access to element of 'fp.p' object by a constant index inside a loop. ECPointTest.java 281


/**
 * Calls <code>implTestAllPoints()</code> for the small literature curves,
 * both for <code>Fp</code> and <code>F2m</code>.
 */
public void testAllPoints()
{
  for (int i = 0; i < fp.p.length; i++)
  {
    implTestAllPoints(fp.p[0], fp.infinity);
  }

  for (int i = 0; i < f2m.p.length; i++)
  {
    implTestAllPoints(f2m.p[0], f2m.infinity);
  }
}

Similar errors can be found in some other places:

  • V6016 Suspicious access to element of 'f2m.p' object by a constant index inside a loop. ECPointTest.java 286


Bugs Found

Checked Projects
346
Collected Errors
13 188