func: static void goodB2G() size_t data ; data = 0; CWE789_Uncontrolled_Mem_Alloc__malloc_char_rand_84_goodB2G * goodB2GObject = new CWE789_Uncontrolled_Mem_Alloc__malloc_char_rand_84_goodB2G ( data ) ; CWE789_Uncontrolled_Mem_Alloc__malloc_char_rand_84_goodB2G::CWE789_Uncontrolled_Mem_Alloc__malloc_char_rand_84_goodB2G(size_t dataCopy) data = dataCopy; data = rand ( ); delete goodB2GObject CWE789_Uncontrolled_Mem_Alloc__malloc_char_rand_84_goodB2G::~CWE789_Uncontrolled_Mem_Alloc__malloc_char_rand_84_goodB2G() char * myString ; if ( data > strlen ( HELLO_STRING ) && data < 100 )  myString = ( char * ) malloc ( data * sizeof ( char ) ); strcpy ( myString , HELLO_STRING ); free ( myString ); 