CWE-395 - Use of NullPointerException Catch to Detect NULL Pointer Dereference
CWE-395
- Abstraction:
- Base
- Structure:
- Simple
- Status:
- Draft
- Weakness Name
Use of NullPointerException Catch to Detect NULL Pointer Dereference
- Description
Catching NullPointerException should not be used as an alternative to programmatic checks to prevent dereferencing a null pointer.
Programmers typically catch NullPointerException under three circumstances: Of these three circumstances, only the last is acceptable.
- Common Consequences
Scope: Availability
Impact: DoS: Resource Consumption (CPU)
- Related Weaknesses
- Release Date:
- 2006-07-19
- Latest Modification Date:
- 2024-02-29
Free security scan for your website