Versions Compared

Key

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

...

Wiki Markup
It is also necessary to call the {{fstat()}} function on an already opened file, rather than calling {{stat()}} on a file name followed by {{open()}} to ensure the file for which the information is being collected is the same file which is opened.  See \[[FIO01-A|FIO01-A. Prefer functions that do not rely on file names for identification]\] for more information.

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

FIO05-A

2 (medium)

2 (probable)

2 (medium)

P8

L2

Related Vulnerabilities

Search for Examples of vulnerabilities resulting from the violation of this recommendation can be found rule on the CERT website.

References

Wiki Markup
\[[Seacord 05|AA. C References#Seacord 05]\] Chapter 7, "File I/O"
\[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\] Section 7.19.3, "Files," and Section 7.19.4, "Operations on Files"
\[[Open Group 04|AA. C References#Open Group 04]\] "The open function," "The fstat function"
\[[Drepper 06|AA. C References#Drepper 06]\] Section 2.2.1 "Identification When Opening"