Excessive Use of Unconditional Branching

Incomplete Base
Structure: Simple
Description

This weakness occurs when code relies heavily on unconditional jumps like 'goto' statements, making the program flow difficult to follow.

Extended Description

Excessive use of unconditional branching creates 'spaghetti code,' where the execution path jumps around unpredictably. This tangled logic makes the codebase significantly harder to read, debug, and modify, as developers struggle to trace how data flows and where specific actions occur. This poor readability directly impacts security. It becomes more time-consuming to audit for vulnerabilities, and fixes are more likely to introduce new bugs. Ultimately, this style of coding lowers the overall maintainability and security posture of the application by obscuring the true program logic.

Common Consequences 1
Scope: Other

Impact: Reduce Maintainability

References 1
Providing a Framework for Effective Software Quality Assessment
Robert A. Martin and Lawrence H. Shafer
07-1996
ID: REF-963
Related Weaknesses