Versions Compared

Key

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

...

The return value from malloc() may be cast in C code that needs to be compatible with C++, where explicit casts from void * are required.

References

Risk Assessment

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MEM02-A

1 (low)

1 (unlikely)

3 (low)

P3

L3

References

Wiki Markup
\[[Summit 05|AA. C References#Summit 05]\] [Question 7.7|http://c-faq.com/malloc/cast.html], [Question 7.7b|http://c-faq.com/malloc/mallocnocast.html]
comp.lang.c FAQ list - Question 7.7
comp.lang.c FAQ list - Question 7.7b