Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Further, the C++ Standard, [expr.mptr.oper], paragraph 6, in part, states the following:

If the second operand is the null pointer to member value, the behavior is undefined.

Do not use a pointer-to-member expression where the dynamic type of the first operand does not contain the member to which the second operand refers, including the use of a null pointer-to-member value as the second operand.

...

Risk Assessment

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

OOP55-CPP

High

Probable

No

NoHigh

P6

L2

Automated Detection

 2810, 2811, 2812, 2813, 2814 

Tool

Version

Checker

Description

Astrée

Include Page
Astrée_V
Astrée_V

overflow_upon_dereference
invalid_function_pointer

Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC++-OOP55
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

LANG.MEM.UVAR

Uninitialized Variable

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

DF2810, DF2811, DF2812, DF2813, DF2814


Klocwork
Include Page
Klocwork_V
Klocwork_V

CERT.OOP.PTR_MEMBER.NO_MEMBER


Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V
CERT_CPP-OOP55-a

A cast shall not convert a pointer to a function to any other pointer type, including a pointer to function type

Parasoft Insure++

Runtime detection
Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C++: OOP55-CPPChecks for pointers to member accessing non-existent class members (rule fully covered). PRQA QA-C++
Include Page
PRQA QA-C++_VPRQA QA-C++_V

Related Vulnerabilities

Search for other vulnerabilities resulting from the violation of this rule on the CERT website.

...