CWE-253

Incorrect Check of Function Return Value

The product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.

Mitigation

Phase: Architecture and Design

Strategy: Language Selection

Description:

  • Use a language or compiler that uses exceptions and requires the catching of those exceptions.
Mitigation

Phase: Implementation

Description:

  • Properly check all functions which return a value.
Mitigation

Phase: Implementation

Description:

  • When designing any function make sure you return a value or throw an exception in case of an error.

No CAPEC attack patterns related to this CWE.

Back to CWE stats page