Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated references from C11->C23

The C Standard, 7.2123.5.3, paragraph 7 [ISO/IEC 9899:20112024], places the following restrictions on update streams:

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

FIO39-C

Low

Likely

Medium

P6

L2

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V

Supported, but no explicit checker
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-FIO39
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

IO.IOWOP
IO.OIWOP

Input After Output Without Positioning
Output After Input Without Positioning

Compass/ROSE

Can detect simple violations of this rule

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

DF4711, DF4712, DF4713


Klocwork

Include Page
Klocwork_V
Klocwork_V

CERT.FIO.NO_FLUSH


LDRA tool suite
Include Page
LDRA_V
LDRA_V

84 D

Fully implemented
Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-FIO39-a

Do not alternately input and output from a stream without an intervening flush or positioning call
PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

2478, 2479

Fully supported

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

Alternating

CERT C: Rule FIO39-CChecks for alternating input and output from a stream without flush or positioning call
Undefined behavior for input or output stream operations
(rule fully covered)

Related Vulnerabilities

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

...

Bibliography

[ISO/IEC 9899:20112024]7.2123.5.3, "The fopen Function"


...