func: static void goodG2B() int data ; data = - 1; CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_84_goodG2B * goodG2BObject = new CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_84_goodG2B ( data ) ; CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_84_goodG2B::CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_84_goodG2B(int dataCopy) data = dataCopy; data = 7; delete goodG2BObject CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_84_goodG2B::~CWE122_Heap_Based_Buffer_Overflow__c_CWE129_connect_socket_84_goodG2B() int * buffer = ( int * ) malloc ( 10 * sizeof ( int ) ) ; buffer [ i ] = 0; buffer [ data ] = 1; for(i = 0; i < 10; i++) printIntLine ( buffer [ i ] ); void printIntLine (int intNumber) printf ( "%d\n" , intNumber ); free ( buffer ); 