Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated parasoft

...

Using the value of a pointer to a FILE object after the associated file is closed is undefined behavior.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

FIO46-C

Medium

Unlikely

Medium

P4

L3

Automated Detection

Tool

Version

Checker

Description

CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
IO.UACUse after close
Compass/ROSE
   



Coverity
Include Page
Coverity_V
Coverity_V

USE_AFTER_FREE

Implemented
Klocwork
Include Page
Klocwork_V
Klocwork_V

SV.INCORRECT_RESOURCE_HANDLING.URH

 


LDRA tool suite
Include Page
LDRA_V
LDRA_V

48 D

Partially implemented
Parasoft C/C++test
Include Page
c:
Parasoft_V
c:
Parasoft_V
BD-RES-FREE
 
Implemented
Polyspace Bug FinderR2016a

Closing a previously closed resource, Standard function call with incorrect arguments, Use of previously closed resource

Function closes a previously closed stream

Argument to a standard function does not meet requirements for use in the function

Function operates on a previously closed stream

SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
S3588
 

Related Vulnerabilities

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

Bibliography

[IEEE Std 1003.1:2013]XSH, System Interfaces, open
[ISO/IEC 9899:2011

Subclause 7.21.3, "Files"
Subclause 7.21.5.1, "The fclose Function"

...


...