Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: David improved rule minus CWE

...

FIO42-C - CWE-403 = SPECIAL_CASES, where SPECIAL_CASES =

  • Sensitive file descriptors are not left open before invoking a child process, but a function with open and close resources, is not matched with a call to close the file before the lifetime of the last pointer that stores the return value of the call (to open the file) has ended or before normal program termination, whichever occurs first

    A program opens a file descriptor and fails to close it, but does not invoke any child processes while the file descriptor is open.

Bibliography

[IEEE Std 1003.1:2013]XSH, System Interfaces, open

...