Umbra Wiki weakness weakness/CWE-1071
Back to wiki

CWE-1071 — Empty Code Block

provenance: imported · CWE: CWE-1071

CWE-1071: Empty Code Block

MITRE CWE weakness

Kind Weakness
Abstraction Base
Status Incomplete
Likelihood of exploit

Description

The source code contains a block that does not contain any code, i.e., the block is empty.

Empty code blocks can occur in the bodies of conditionals, function or method definitions, exception handlers, etc. While an empty code block might be intentional, it might also indicate incomplete implementation, accidental code deletion, unexpected macro expansion, etc. For some programming languages and constructs, an empty block might be allowed by the syntax, but the lack of any behavior within the block might violate a convention or API in such a way that it is an error.

Common consequences

  • Other: Reduce Reliability

Mitigations

(none listed)

References

  • CWE page: https://cwe.mitre.org/data/definitions/1071.html
  • CWE list: https://cwe.mitre.org/data/index.html