An unconditional 'continue' follows a specific exclusion condition. For loop control flows where the excluded value is intended to fall through and process subsequent configurations (such as SSR handler assignments), an unconditional continue mistakenly skips the rest of the loop block. Ensure the continue is guarded conditionally or correctly isolated.
Rule Explorer
Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.
- Public rules
- 2917
- Downloads
- 3.6M
- Verified
- 2917
- Authors
- 2
Array.splice() is called inside a backward-decrement while loop but the enclosing block only returns conditionally (inside a nested if) after removal. When the condition is false the loop continues iterating over the now-shorter array with stale index bounds, causing state corruption that can crash the process or corrupt shared state under concurrent access
The read value of CSR henvcfg is masked with the full MENVCFG_WMASK against menvcfg (e.g. `henvcfg_out &= menvcfg->val & MENVCFG_WMASK;`). Because MENVCFG_WMASK covers bits [7:4] (CBIE/CBCFE/CBZE) in addition to STCE/DTE/PBMTE, this overbroad mask incorrectly subordinates henvcfg's cache-block-management fields to menvcfg. Per the RISC-V H-extension specific
A function accepting an array by reference recursively calls itself using a by-value copy of an element from a `foreach` loop. Modifications made by the recursive call overwrite the local copy rather than the original array, meaning sanitizations and validations are bypassed for nested items. To fix this, pass the explicit array index reference (e.g., `$ARR[