mirror of
https://github.com/github/codeql.git
synced 2025-12-25 21:26:37 +01:00
20 lines
512 B
Plaintext
20 lines
512 B
Plaintext
/**
|
|
* @name Returned pointer not checked
|
|
* @description Dereferencing an untested value from a function that can return null may lead to undefined behavior.
|
|
* @kind problem
|
|
* @id cpp/missing-null-test
|
|
* @problem.severity recommendation
|
|
* @security-severity 7.5
|
|
* @tags reliability
|
|
* security
|
|
* external/cwe/cwe-476
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from VariableAccess access
|
|
where
|
|
maybeNull(access) and
|
|
dereferenced(access)
|
|
select access, "Value may be null; it should be checked before dereferencing."
|