CWE一覧に戻る
CWE-1071

空のコードブロック

Empty Code Block
脆弱性 作成中
JA

ソース・コードには、コードを含まないブロック、つまり空のブロックが含まれている。

空のコード・ブロックは、条件文、関数やメソッドの定義、例外ハンドラなどの本体で発生する可能性があります。 空のコード・ブロックは意図的な場合もありますが、不完全な実装、偶発的なコードの削除、予期しないマクロの展開などを示す場合もあります。 プログラミング言語や構文によっては、空のブロックが構文上許容されていても、ブロック内の動作がないために規約やAPIに違反し、エラーとなる場合があります。

EN

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.

Scope: Other / Impact: Reduce Reliability
MITRE公式ページ — CWE-1071