Null pointer dereferencing refers to treating a null
variable as if it were a valid object or field and proceeding to use it without checking its state. Typically, this condition results in a NullPointerException
which may sometimes result in denial of service. Additionally, catching and ignoring NullPointerExceptions
can result in subsequent program failures or security issues that are very difficult to diagnose (see EXC00-J. Do not suppress or ignore checked exceptions for more details). While other runtime exceptions can produce similar effects, NullPointerException
is often found to be the most frequent show-stopper.
...
Dereferencing a null
pointer can lead to denial of Service. In multithreaded programs, this can violate cache coherency policies and cause resource leaks. Catching and ignoring NullPointerException
can result in hard to diagnose system failures or security issues.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
EXP01- J | low | likely | high | P3 | L3 |
...