Versions Compared

Key

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

...

The behavior of a program is undefined when it uses the value of a pointer to a FILE object after the associated file is closed (see undefined behavior 148153.) Programs that close the standard streams (especially stdout but also stderr and stdin) must be careful not to use the stream objects in subsequent function calls, particularly those that implicitly operate on such objects (such as printf(), perror(), and getc()).

...

Failing to properly close files may allow unintended access to, or exhaustion of, system resources.

Rule

Severity

Likelihood

Detectable

Remediation CostRepairable

Priority

Level

FIO22-C

Medium

Unlikely

No

NoMedium

P4P2

L3

Automated Detection

Tool

Version

Checker

Description

Compass/ROSE


Klocwork
Include Page
Klocwork_V
Klocwork_V

RH.LEAK


LDRA tool suite
Include Page
LDRA_V
LDRA_V

49 D

Partially implemented
Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-FIO22-a

Ensure resources are freed

...