Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Simultaneously opening a file multiple times can result in unexpected errors and nonportable behavior.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

FIO24-C

Medium

Probable

No

NoHigh

P4

L3

Automated Detection

Tool

Version

Checker

Description

CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

IO.RACE
(customization)

IO.BRAW

File system race condition
Users can implement a custom check that triggers a warning if a file-opening function is called on a file that is already open

File Open for Both Read and Write

LDRA tool suite
Include Page
LDRA_V
LDRA_V

75 D

Partially implemented

Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-FIO24-aAvoid race conditions while accessing files

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rec. FIO24-CChecks for situations where previously opened resources are reopened (rec. fully covered)

Related

...

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

Related Guidelines

...