...
Wiki Markup |
---|
Note that in accordance with rule \[[MEM35-C|MEM35-C. Allocate sufficient memory for an object]\] the argument supplied to {{malloc()}} is checked to ensure a numeric overflow does not occur. |
...
Wiki Markup |
---|
To correct this error, ensure the pointer returned by {{malloc()}} is not NULL. In addition to this rule, this should be done in accordance with rule \[[MEM32-C|MEM32-C. Detect and handle critical memory allocation errors]\]. |
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
References
Wiki Markup |
---|
\[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\] Section 6.3.2.3, "Pointers" \[[Jack 07|AA. C References#Jack 07]\] \[[van Sprundel 06|AA. C References#van Sprundel 06]\] \[[Viega 05|AA. C References#Viega 05]\] Section 5.2.18, "Null-pointer dereference" |