CVE-2026-65927: For Loop Off By One Restart

Resetting loop variable '$I' to 0 immediately before 'continue' in an incrementing for-loop causes '$I' to increment to 1 on the next iteration, skipping index 0. Set '$I = -1' if the loop is intended to restart from index 0.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-65927-for-loop-off-by-one-restart --engine opengrep

Description

Resetting loop variable '$I' to 0 immediately before 'continue' in an incrementing for-loop causes '$I' to increment to 1 on the next iteration, skipping index 0. Set '$I = -1' if the loop is intended to restart from index 0.