...
This rule appears in the C++ Secure Coding Standard as MEM07-CPP. Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t.
...
Bibliography
Wiki Markup |
---|
\[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] Section 7.18.3, "Limits of other integer types" \[[MITRE 07|AA. Bibliography#MITRE 07]\] [CWE ID 190|http://cwe.mitre.org/data/definitions/190.html], "Integer Overflow (Wrap or Wraparound)," and [CWE ID 128|http://cwe.mitre.org/data/definitions/128.html], "Wrap-around Error" \[[Seacord 05|AA. Bibliography#Seacord 05]\] Chapter 4, "Dynamic Memory Management" \[[RUS-CERT|AA. Bibliography#RUS-CERT]\] Advisory 2002-08:02, "Flaw in calloc and similar routines" \[[Secunia|AA. Bibliography#Secunia]\] Advisory SA10635, "HP-UX calloc Buffer Size Miscalculation Vulnerability" |
...