Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider v2.1 (sch jbop) (X_X)@==(Q_Q)@

...

Wiki Markup
According to C99 \[[ISO/IEC 9899-:1999|AA. C References#ISO/IEC 9899-1999]\]:

...

Fortify SCA Version 5.0 is able to detect violations when an array is declared in a function and then a pointer to that array is returned.

The tool Compass Rose /ROSE automatically detects returning pointers to local variables. Detecting more general cases, such as examples where static pointers are set to local variables which then go out of scope would be difficult.

...

Wiki Markup
\[[Coverity 07|AA. C References#Coverity 07]\]
\[[ISO/IEC 9899-:1999|AA. C References#ISO/IEC 9899-1999]\] Section 6.2.4, "Storage durations of objects," and Section 7.20.3, "Memory management functions"
\[[MISRA 04|AA. C References#MISRA 04]\] Rule 8.6

...