Title: MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type  
Author: Robert Seacord Sep 04, 2006
Last Changed by: Anirban Gangopadhyay Sep 03, 2019
Tiny Link: (useful for email) https://wiki.sei.cmu.edu/confluence/x/99YxBQ
Export As: Word · PDF  
Hierarchy
Parent Page
    Page: Rec. 08. Memory Management (MEM)
Outgoing Links
External Links (7)
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://www.mathworks.com/help/bugfinder/ref/certcrec.mem02…
    https://www.kb.cert.org/vulnotes/bymetric?searchview&query=…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    c-faq.com/malloc/cast.html
    c-faq.com/malloc/mallocnocast.html
SEI CERT C Coding Standard (23)     Page: Astrée
    Page: RuleChecker_V
    Page: Axivion Bauhaus Suite_V
    Page: RuleChecker
    Page: Parasoft
    Page: ECLAIR_V
    Page: EXP39-C. Do not access a variable through a pointer of an incompatible type
    Page: BB. Definitions
    Page: Astrée_V
    Page: DCL31-C. Declare identifiers before using them
    Page: EXP36-C. Do not cast pointers into more strictly aligned pointer types
    Page: ECLAIR
    Page: Polyspace Bug Finder
    Page: Axivion Bauhaus Suite
    Page: PRQA QA-C_v
    Home page: SEI CERT C Coding Standard
    Page: PRQA QA-C
    Page: INT32-C. Ensure that operations on signed integers do not result in overflow
    Page: Polyspace Bug Finder_V
    Page: Parasoft_V
    Page: AA. Bibliography
    Page: Rose
    Page: PRE00-C. Prefer inline or static functions to function-like macros
SEI CERT C++ Coding Standard (2)     Home page: SEI CERT C++ Coding Standard
    Page: VOID MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type